(An Unofficial) Python Tutorial Wiki

putting the community back in "maintained by the community"

Suggested Wiki Restructure by Gerard

COMMENT: Three sections: beginners, intermediate, and advanced.

Beginners

  1. Intro
  2. Interpreter
  3. Numbers
  4. Strings
  5. Lists
  6. Dictionaries
  7. Control Flow
  8. Functions
  9. Classes

Intermediate

  1. Intro
  2. Names and Scopes
  3. Classes
  4. Exceptions
  5. List Comprehensions
  6. Iterators
  7. A Tour of the Standard Library - Part 1
  8. A Tour of the Standard Library - Part 2
  9. Unit Testing
  10. Timing and Debugging
  11. Regular Expressions
  12. XML
  13. cgi

Advanced (Suggestions)

  • Threads
  • Sockets
  • Decorators
  • Extending and Embedding Python
  • WSGI

Comments

I like the basic idea.

I might recommend adding a fourth, Python as a First Language category. Beginners who are already programmers will have different needs than beginners who are non-programmers.

I have been teaching Python as a first language based on the presumption that beginners do not need to know about floats, and certainly complex numbers do not need to enter into it.

I introduce integers, strings, lists, for loops, print, and the range and type built-ins. It is then possible to demonstrate solving a reasonably complicated problem. I have since then proceeded to function definitions and imports.

Many of the other things that are typically taught at the beginning can be profitably deferred. Operator precedence is a big one. I recommend avoiding floats at first because they are somewhat different beasts than what they seem to be. Explaining them properly is quite involved, and explaining them inadequately can be a disservice.

My basic design decision was to find the minimal subset of Python that could be used to solve interesting problems.

I am currently in a bit of a tangle trying to make clear what the "return" statement does.

I absolutely urge that installation of Python NOT be included as the first chapter of the beginner's tutorial. It should just say "if Python is not installed on your computer, read <link to installation document> first".

I do think a clear explanation of the distinction between interactive mode and command-line mode is important to put early in the document, and somewhat problematic for the true beginner. I rather wish that the behavior of the interactive mode to print non-None returns were not there at least by default; it presents a messy implementation detail that is hard to grasp at first.

I like the basic idea.

Thanks!

I might recommend adding a fourth, Python as a First Language category. Beginners who are already >programmers will have different needs than beginners who are non-programmers.

Agreed. 'First Language Users' are an important constituency. I've only ever skimmed through Swaroop's 'A Byte of Python' but it seems to get a good press, though it's a bit more than the 'minimal subset' approach that you mention.

I absolutely urge that installation of Python NOT be included as the first chapter of the >beginner's tutorial. It should just say "if Python is not installed on your computer, read <link >to installation document> first".

I've had the same thought myself. Will try to think of an alternative intro.

Thanks for the interesting comments.

Gerard

I wonder if using the interpreter, command-line mode, and running progams as .py files should be explained in a separate section, subdivided by the three major platforms and operating systems, possibly with screenshots. Explain simply and clearly that from now on when you see >>> it means you're in the interpreter, and when you see :> it means you're at the command prompt.

Sounds good to me. I'm thinking of a rewrite for this section, but if you beat me to it I'll not be offended ;-)

Thanks for the feedback.