User:Yath/Python
NOTE: This page is mostly obsolete and the reorganization has been accomplished.
This is a scratch page for reorganizing Programming:Python. The book currently has two tables of contents. One of them may or may not represent a reasonable progression through the subject. At any rate, the book is in an amazing state of disarray; I'll try to evaluate and plan some reconstruction here.
These are just the pages that exist. There are also many red links.
This page has three sections. One of them is an outline, so I won't be putting in headings and subheadings here (they would interfere with the outline). They are:
- Analysis of old content
- New section outline
- Copy of old content
| Existing chapter | Apparent purpose | What to do with it | |
|---|---|---|---|
| Beginning | Actually getting it up and running; entering and running programs. | A good second chapter (just after the narrative introduction). Just the thing to prepare for delving into actual code (hello world). | |
| syntax | Python's syntax is C-like. | Trash it. | |
| features | Not really "features"; it's a list of data types. Good for... a list of data types. | The reference section. | |
| and data | Might have been intended to be about data types; but so far it's just about lists and the operations you can do on them. | Merge into tutorial section that occurs after we've played with lists. (Following a general format of tutorialship that says: play with this, play with this, this is a list--play with this, now here's all about lists. now play with lists some more.) | |
| Preliminaries | Fundamental python concepts. | Not at all appropriate for "preliminaries", with the exception of case-sensitivity. Good for the indepth language description occurring in the advanced section of the book. | |
| modules | A thin overview of modules. | ||
| variables | A discussion of scoping, with examples. "Variables" is not the right title. | ||
| data types | An overview of Python's data types. | ||
| simple input and output | I/O, for sure. | Put in the i/o section. | |
| Simple math | Good for the operators section. | ||
| control | Flow control section. | ||
| procedures and functions | Functions section. | ||
| classes and instances | Classes section. | ||
| strings | Data types section. | ||
| error handling | Hmm. Exceptions. | Flow control section? Or its own section? | |
| A simple tutorial in Python | Empty, delete. | ||
| Python community | About the Python community. | Goes in the introduction. |
Potential outline
Contents |
[edit] Introduction
This section is for lighthearted reading, and to prepare the reader for the next section (learning to program).
[edit] What is Python
[edit] Getting Python
[edit] Editing and running Python programs
[edit] Learning to program in Python
This section presents a series of examples and exercises of increasing depth and complexity. It sort of follows the sequence of the "Python concepts" section, but tosses in bits from more advanced and less advanced sections. For example, when the sample programs seem to be playing with "flow control" (loops etc.) the os module might be imported and used for a simple function (from ahead) and triple-quoted multiline strings might pop in (from behind). This sort of stuff is done sparingly, because you don't want to overwhelm the reader. It is necessary, however, to keep people from becoming too bored. And it can usually be ignored, unless the reader gets too curious, in which case they can turn to the section on the os module and read up a bit.
[edit] Your first program in Python
[edit] The foo program
[edit] The snarf program
[edit] The cgi program
[edit] Python concepts
This section is like a concept reference. Want something that's a step up from a list of flow control operators? Here it is. Every idiosyncracy of 'if-else-elif-unless' is clearly presented and explained. This would be inappropriate for the learning section. This is the place for completeness.
[edit] Basic syntax
[edit] Data types
[edit] Numbers
[edit] Strings
[edit] Tuples
[edit] Lists
[edit] Dictionaries
[edit] Operators
Math, concatenation. Perhaps backticks (number-to-string-conversion) belongs here. Remember to include a precedence table.
[edit] Flow control
[edit] Functions
[edit] Scoping
[edit] Input and output
[edit] Modules
[edit] Classes
[edit] Standard modules
All or most standard modules, complete function lists, explained.
[edit] os module
[edit] sys module
[edit] re module
[edit] Function reference
Built-in functions explained.
COPY OF OLD CONTENT
Contents
- Beginning Python
- Python syntax and functions
- Python features
- Python and data (lists)
- Code and interfaces in Python
- Advanced Python
Beginning Python
- Basic Concepts
- Modules
- Variables
- Data Types
- Simple Input and Output
- Simple math
- Program Flow
- Procedures and Functions
- Python classes and instances
- Libraries
- Further math in Python
- Basics of Compilation
- Exercises
In-depth Python ideas
- String Manipulation
- Programming Structure and Style
- Python complex types
- Error Catching
- Operator Overloading
- Standard libraries
- Memory Management
- Generators and the generator protocol
Python and beyond