Notice: This page displays a fallback because interactive scripts did not run. Possible causes include disabled JavaScript or failure to load scripts or stylesheets.
Python 2.5 Documentation Download all these documents (Many formats are available, including typeset versions for printing.) Locate previous versions What's New in Python 2.5 (changes since previous major release) Tutorial (start here) Global Module Index (for quick access to all modules) Library Reference (keep this under your pillow) Macintosh Library Modules (this too, if you use a Macintosh) Language Reference (for language lawyers) Extending and Embedding (tutorial...
Download Python 2.5 Documentation To download an archive containing all the documents for this version of Python in one of various formats, follow one of links in this table. The numbers in the table are the size of the download files in Kilobytes. Content Format ZIP BZip2 HTML 4001K 1526K PDF (US-Letter) 5495K 5417K PDF (A4) 5465K 5491K PostScript (US-Letter) 2427K 1771K PostScript (A4) 2433K 1774K LaTeX 1910K 1333K Contents These archives contain the following documen...
Python 2.5.2 Documentation Download all these documents (Many formats are available, including typeset versions for printing.) Locate previous versions What's New in Python 2.5 (changes since previous major release) Tutorial (start here) Global Module Index (for quick access to all modules) Library Reference (keep this under your pillow) Macintosh Library Modules (this too, if you use a Macintosh) Language Reference (for language lawyers) Extending and Embedding (tutori...
Download Python 2.5.2 Documentation To download an archive containing all the documents for this version of Python in one of various formats, follow one of links in this table. The numbers in the table are the size of the download files in Kilobytes. Content Format ZIP BZip2 HTML 4.0M 1.6M PDF (US-Letter) 5.3M 5.3M PDF (A4) 5.3M 5.3M PostScript (US-Letter) 2.5M 1.8M PostScript (A4) 2.5M 1.8M LaTeX 1.9M 1.3M Contents These archives contain the following documents: What'...
Python 2.5.3 Documentation Download all these documents (Many formats are available, including typeset versions for printing.) Locate previous versions What's New in Python 2.5 (changes since previous major release) Tutorial (start here) Global Module Index (for quick access to all modules) Library Reference (keep this under your pillow) Macintosh Library Modules (this too, if you use a Macintosh) Language Reference (for language lawyers) Extending and Embedding (tutori...
Download Python 2.5.3 Documentation To download an archive containing all the documents for this version of Python in one of various formats, follow one of links in this table. The numbers in the table are the size of the download files in Kilobytes. Content Format ZIP BZip2 HTML 4.0M 1.6M PDF (US-Letter) 5.3M 5.3M PDF (A4) 5.3M 5.3M PostScript (US-Letter) 2.5M 1.8M PostScript (A4) 2.5M 1.8M Contents These archives contain the following documents: What's New in Python 2...
Python 2.5.4 Documentation Download all these documents (Many formats are available, including typeset versions for printing.) Locate previous versions What's New in Python 2.5 (changes since previous major release) Tutorial (start here) Global Module Index (for quick access to all modules) Library Reference (keep this under your pillow) Macintosh Library Modules (this too, if you use a Macintosh) Language Reference (for language lawyers) Extending and Embedding (tutori...
Download Python 2.5.4 Documentation To download an archive containing all the documents for this version of Python in one of various formats, follow one of links in this table. The numbers in the table are the size of the download files in Kilobytes. Content Format ZIP BZip2 HTML 4.0M 1.6M PDF (US-Letter) 5.3M 5.3M PDF (A4) 5.3M 5.3M PostScript (US-Letter) 2.5M 1.8M PostScript (A4) 2.5M 1.8M Contents These archives contain the following documents: What's New in Python 2...
Python Copyright Python Copyright Historical note: This page describes the Python license used for Python versions up to and including Python 1.6a2. CNRI released Python 1.6b1 and the final Python 1.6 release under a different license, which is open source compliant, but not compatible with the GPL (the only incompatibility being the inclusion of a choice-of-law clause). More recent PSF releases, in particular 2.0.1, 2.1.1, and all releases since then, are GPL-compatible. Most P...
Python Documentation Index Python Essays In this directory I place short essays (anything from 500 to 5000 words) on various Python subjects. See also a collection of presentations I have given. See also my blog at blogspot.com and my previous blog at artima.com. --Guido van Rossum Table of contents (in mostly chronological order) Unifying types and classes in Python 2.2 (See below) Foreword for "Programming Python" (1st ed.) Written in 1996, this gives an overview of the earl...
What is Python? Executive Summary What is Python? Executive Summary Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore r...
Proposed Improvements to Module Cleanup Proposed Improvements to Module Cleanup I'm experimenting with a better way of cleaning up at the end of an execution run. Without implementing true GC, I can never do it 100% right, but I can implement a predictable set of rules based on practical observation that will solve most problems that are actually observed. Here's my proposal. At the end of this message I list some potential problems with the proposal and ask for feedback. This wi...
Comparing Python to Other Languages Comparing Python to Other Languages Disclaimer: This essay was written sometime in 1997. It shows its age. It is retained here merely as a historical artifact. --Guido van Rossum Python is often compared to other interpreted languages such as Java, JavaScript, Perl, Tcl, or Smalltalk. Comparisons to C++, Common Lisp and Scheme can also be enlightening. In this section I will briefly compare Python to each of these languages. These comparison...
Computer Programming for Everybody Computer Programming for Everybody This is the text of a revised funding proposal that we sent to DARPA in August 1999. In March, we heard that at least an earlier version of the proposal was accepted by DARPA; the work has begun late 1999 and will hopefully last two years, although we've only received funding for the first year (through October 2000). We're keeping our fingers crossed for the rest. Unfortunately, the move of the Python developm...
Computer Programming for Everybody Computer Programming for Everybody This is the main text of a funding proposal that we sent to DARPA in January 1999. In August 1999, we submitted a revised version of the proposal. Please look at the EDU-SIG home page (Python in Education Special Interest Group). This is where the current project status is described and/or will be discussed, and where you'll find pointers to more resources. Note:I have made one change to the text of the propos...
Foreword for "Programming Python" (1st ed.) Foreword for "Programming Python" (1st ed.) This is the foreword I wrote for Mark Lutz' book "Programming Python" (1st ed.), published by O'Reilly. See also my foreword to the 2nd edition. As Python's creator, I'd like to say a few words about its origins, adding a bit of personal philosophy. Over six years ago, in December 1989, I was looking for a "hobby" programming project that would keep me occupied during the we...
...= 1 instead of x = x+1. A few people wondered what the big deal was (answer: instead of x, imagine dict[key] or list[index]), but overall this was a big hit with those users who were already used to augmented assignment in other languages. Less warm was the welcome for the extended print statement: print>>file, a shortcut for printing to a different file object than standard output. Personally, it's the Python 2.0 feature I use most frequently, but most people who opened their ...
...=[]): path = path + [start] if start == end: return path if not graph.has_key(start): return None shortest = None for node in graph[start]: if node not in path: newpath = find_shortest_path(graph, node, end, path) if newpath: if not shortest or len(newpath) < len(shortest): shortest = newpath return shortest Sample ru...
...= "" for i in range(0, 256, 16): # 0, 16, 32, 48, 64, ... s = "" for character in map(chr, list[i:i+16]): s = s + character string = string + s return string Unfortunately, for a list of 256 items, this version ran a bit slower (though within 20%) of f3(). Since writing a general version would only slow it down more, we didn't bother to pursue this path any further (except that we also compared it with a varian...
...= 1 b = 2 This can be though of as equivalent to: C = type(B)('C', (B,), {'a': 1, 'b': 2}) If that's too dense for you, here's the same thing written out using temporary variables: creator = type(B) # The type of the base class name = 'C' # The name of the new class bases = (B,) # A tuple containing the base class(es) namespace = {'a': 1, 'b': 2} # The namespace of the class statement C = creator(name, bases, ...
If you didn't find what you need, try your search in the Python language documentation.