179 Commits

Author SHA1 Message Date
Fred Drake
2045f56f08 - explain about making Python scripts executable on Unix in more
detail
2003-07-07 21:01:09 +00:00
Fred Drake
cb34054b92 Remove heading from orphan section. 2003-06-20 14:28:05 +00:00
Fred Drake
82d309b795 Include "instances of most classes" in a warning about mutable objects
as default values of function/method parameters.
2003-06-18 17:17:10 +00:00
Skip Montanaro
8fc096a3d4 add missing parens - verified w/ interpreter - sorry to dismiss your comment
Fred
2003-05-07 16:02:06 +00:00
Skip Montanaro
6069b642bb replace most uses of ... by repr(...), noting that ... is discouraged,
but convenient in interactive sessions.
2003-05-07 15:29:53 +00:00
Fred Drake
6df8727dda Chapter titles that get split over multiple lines in the typeset
formats can't have whitespace after the last non-blank character (bug
in LaTeX?); fix up a couple of instances of this.

Update an email address.
2002-10-28 19:30:45 +00:00
Raymond Hettinger
1aaec815f1 Clarify packages in tutorial. Closes SF bug #616211. 2002-10-26 03:15:03 +00:00
Fred Drake
95e660770f Describe __path__ along with the rest of the package description.
Closes SF bug #626554.
2002-10-22 21:01:33 +00:00
Raymond Hettinger
66d8b27ce7 Backport 1.160 on looping idioms. Excludes enumerate(), a Py2.3 feature. 2002-10-05 05:14:19 +00:00
Raymond Hettinger
9efc1117e7 Backport 1.161: Message for NameError has changed. 2002-10-05 05:04:07 +00:00
Raymond Hettinger
4f97618845 Added a tutorial note and example regarding the scope of loop variables
in a list comprehension.  Includes a justification and a comparision
to regular for-loops.

Closes SF bug 605047.
2002-09-06 18:09:22 +00:00
Fred Drake
f729ca0b6f Remove a broken example of extreme backward compatibility; it is
simply not relevant any more.
Closes SF bug #595032.
2002-08-14 15:27:19 +00:00
Raymond Hettinger
f78a5cd397 GvR pointed out that only enclosing function bodies are part of nested scopes. 2002-08-07 20:23:00 +00:00
Raymond Hettinger
1b0972ce5c Describe nested scopes in the tutorial. Closes SF bug 500704. 2002-08-07 16:06:35 +00:00
Fred Drake
56d523306d Fix typo reported to python-docs. 2002-06-26 21:43:42 +00:00
Raymond Hettinger
cbfac7efdd Completed previous edit 2002-06-25 15:21:02 +00:00
Raymond Hettinger
8dc23be0d2 Close bug 480337: Dict used before dicts explained. Added explanation
and examples of the dict() constructor.
2002-06-25 15:02:31 +00:00
Fred Drake
048127f1bd Completely revise markup for the list of list methods; the new markup matches
the semantics and presentation used in the library reference.
Added an explanation of the use of [...] to denote optional arguments, since
this is the only use of this in a signature line.
Closes SF bug #567127.
2002-06-11 02:57:32 +00:00
Fred Drake
b74a9623ef "Shortcut" should be "short-circuit".
This closes SF bug #526277.
2002-03-08 01:01:23 +00:00
Fred Drake
0d55fc36e5 Revise cheeseshop example so that the order of the keyword output is
completely determined by the example; dict insertion order and the string
hash algorithm no longer affect the output.
This fixes SF bug #509281.
2002-01-29 14:54:18 +00:00
Fred Drake
23d45f4744 Fix up some examples in the tutorial so we don't contradict our own
advice on docstrings.
This fixes SF bug #495601.
2001-12-20 23:54:56 +00:00
Fred Drake
ecd8157a2c Include a warning that scripts should not have the same name as standard
modules, or the module cannot be properly imported.  (Based on a suggestion
sent to python-docs.)

Update the displayed dir() of the sys and __builtin__ module with Python 2.2.
2001-12-04 19:47:46 +00:00
Fred Drake
6016dbecca Talk about str() in the discussion of string representations of values, and
give examples for which str() and repr() yield different results.
This closes SF bug #485446.
2001-12-04 19:20:43 +00:00
Fred Drake
fcf94681ed Update lambda description to reflect nested scopes. This was noted by
Andrew Koenig.
2001-12-03 21:47:37 +00:00
Fred Drake
1da50f6c6e Add a scalar product to the example list comprehensions based on a suggestion
sent to python-docs.
2001-12-03 18:54:33 +00:00