Talk:Non-Programmer's Tutorial for Python 2.0

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

[edit] Syntax highlighting

I think the tutorial could get even more attractive with some syntax highlighting of the code. Wikibooks supports the mw:Extension:SyntaxHighlight GeSHi extension, which actually looks really nice. In order to use it, code examples have to be put into <source lang="python">...</source> tags, which could actually replace the <pre>...</pre> tags used almost everywhere in the book so far. This works only for code blocks and not for in-line code, but I think that's a minor problem. Any objections? Siebengang 12:58, 27 September 2007 (UTC)

I could implement this change quickly using my bot, if nobody disagrees with the change. I think it would be a big improvement over the existing code formatting. --Whiteknight (Page) (Talk) 14:17, 27 September 2007 (UTC)
print "I think it would a good idea."
Jrincayc 02:41, 28 September 2007 (UTC)
Automating dirty work is great:
for chapter in book: quick_syntax_bot(chapter)
Go for it! I can have a look at the result and fine-tune things if necessary. Siebengang 08:29, 28 September 2007 (UTC)
Yes check.svg Done. I didnt realize there were so many special cases, so my bot ended up making a big mess. I've fixed it all as best I could, and i think it all looks pretty good. Let me know if we need anything else. --Whiteknight (Page) (Talk) 17:15, 28 September 2007 (UTC)
Thank you! I went through the book and fixed some more small things. Should be more or less bug free now. --Siebengang 10:15, 1 October 2007 (UTC)

[edit] Refurbishing Code examples according to Python Style Guide (PEP 8)

During the next weeks, I am going to check the formatting of the code examples so that they get compliant with the Python Style Guide (PEP 8, http://www.python.org/dev/peps/pep-0008/). Apart from that, there are some LaTeX style references in the text (\ref{...something...}) and some other minor bugs which I'll fix, too. --Siebengang 12:33, 11 January 2007 (UTC)

Done up to Debugging --Siebengang 15:37, 11 January 2007 (UTC)
Done up to Lists --Siebengang 15:27, 15 January 2007 (UTC)
Done up to Boolean Expressions --Siebengang 10:45, 17 January 2007 (UTC)
Done until Using Modules --Siebengang 11:49, 22 January 2007 (UTC)
Did More on Lists, Revenge of the Strings, The End and FAQ --Siebengang 11:38, 23 January 2007 (UTC)
Finally done: Dealing with the imperfect and File IO --Siebengang 12:08, 23 January 2007 (UTC)

[edit] Before You Begin Your Quest chapter

I merged the information from [[../Before You Begin Your Quest|Before You Begin Your Quest]] with [[../Intro|Intro]] and took away the link from the table of contents, to get rid of the redundency. --Siebengang (talk) 11:21, 20 February 2008 (UTC)

[edit] Redundant solution set info?

Is there a particular reason why the same text from module exercise descriptions is included in the solution set as well? It seems redundant to me with the current (description of exercise) (solution bar) (description of exercise) setup the text has now. --Tehdrago (talk) 20:20, 15 November 2008 (UTC)

[edit] break and continue

It's probably worth introducing the 'break' and 'continue' statements here. I don't think they are described anywhere at all in the book at the moment Dooglus 19:37, 1 May 2006 (UTC) dooglus

[edit] None

Might want to have something on assigning a value of "None" to variables in the Count to 10 module or in the previous lesson, Who Goes There?". The Exercise section in Count to 10 uses it without a prior introduction, I was a bit confused when trying to figure out the solution.

Maybe something like this?

So what about assigning a variable an empty value? You can't exactly have a python program written up like this:

variable_1 =
variable_2 =
print variable_1, variable_2

If you try to run the above program in Python you will receive an invalid syntax error. When we want to assign an empty value to a variable, Python has the special type that can be used for this case called "None". You can test it out by using it in the example provided above:

variable_1 = None
variable_2 = None
print variable_1, variable_2

When you run the program now you will see an output of:

None None

I'm not sure about the exacts details here as I'm learning python myself, maybe someone more experienced could clean this up and add it in? --Tehdrago (talk) 10:18, 15 November 2008 (UTC)

[edit] Talk page suggestions

[edit] Merge talk pages?

I added the "Count to 10" talk page contents here to the main page. I think it might be easier if all the talk pages for the wikibook were in the same location. As there only seems to be a small number of contributors currently working on the wiki, I think it would make things easier to have all the suggestions in the same place. Maybe create a "master" talk page that had the contents of all the individual talk similar to the "printable version" style page? It might get messy if all the module talk pages were redirected here. --Tehdrago (talk) 09:06, 16 November 2008 (UTC)

[edit] Archiving

Would anyone mind if I moved the older, implemented suggestion discussions here to an "archive" page, so only the not discussed / unresolved issues are shown? --Tehdrago (talk) 09:06, 16 November 2008 (UTC)

Hmm, I found a to-do list in the module "The End", I'll use that for keeping track of suggested changes for now. --Tehdrago (talk) 18:18, 16 November 2008 (UTC)

[edit] Python 3.0

I am going to start creating Non-Programmer's Tutorial for Python 3.0 soon. Since most of the examples in the existing tutorial will be invalid in python 3.0, and python 2.6 will be here for a while, I figure we can have two tutorials for awhile. Jrincayc (talk) 04:49, 30 December 2008 (UTC)

I started it. Jrincayc (talk) 15:29, 31 December 2008 (UTC)
Should we move this tutorial for Python 2.6 to "Non-Programmer's Tutorial for Python 2.6"? --DavidCary (talk) 00:11, 5 January 2009 (UTC)
Well, I think any python 2.2 to 2.6 will work with this version. Almost all the examples will work in python 1.6 - 2.6. That said I have no objection to moving it to something like "Non-Programmer's Tutorial for Python 2". Jrincayc (talk) 04:20, 5 January 2009 (UTC)

I moved it...something is wrong...its all red links? I even moved the subpages. --33rogers (talk) 11:36, 20 June 2009 (UTC)

nevermind I just purged the wiki cache and its proper now :) --33rogers (talk) 11:40, 20 June 2009 (UTC)

[edit] Exercises

I noticed that many solutions to excersises were much messier than they needed to be. Should they at least note that their are other solutions?

They can note that there are other solutions. Some of the exercises already have multiple solutions. They also can be rewritten, but be careful to only use features of python that have already been discussed (For example don't use boolean logic until after it has been discussed in the tutorial.) Jrincayc (talk) 12:17, 9 June 2009 (UTC)