Download Python Web Development with Django

Transcript
Summary
NAME
foo - foo.py -- sample module demonstrating documentation strings
FILE
c:\python25\lib\site-packages\foo.py
CLASSES
__builtin__.object
Foo
class Foo(__builtin__.object)
| Foo() - empty class ... to be developed
|
| Data descriptors defined here:
|
| __dict__
|
dictionary for instance variables (if defined)
|
| __weakref__
|
list of weak references to the object (if defined)
FUNCTIONS
bar(x)
bar(x) - function docstring for bar, prints out its arg "x"
Docstrings for most software available in the Python Standard Library already exist, so
if you need help with a built-in function, methods of built-in types, or any module or
package attribute, feel free to “ask for help,” such as help(open), help(''.strip),
help(time.ctime), and so forth, assuming you’ve imported any necessary modules to get
access to an attribute.
Summary
In this very large introductory chapter, we attempted to welcome new Django developers
to Python. Obviously we cannot be as comprehensive as we would like, but this is really a
Django book, not a Python one.With that said, however, we attempted to condense as
much relevant Python material as necessary to succeed with Django.
The first three-quarters of the chapter were mostly Python language material along
with the appropriate Django relationships spelled out; the final part of the chapter contains more of the “softer skills”: the gotchas, style guidelines, and so forth. Hopefully,
we’ve exposed enough of the language to give you the skills to read and write basic
Python code, so you can now branch off to the Django world.
55