Commit Graph

187 Commits

Author SHA1 Message Date
Fred Drake 6bab183d4e Markup nits. 2003-05-20 15:28:58 +00:00
Raymond Hettinger a02469f969 More message updates and minor fixes. 2003-05-07 17:49:36 +00:00
Raymond Hettinger a2f84ceda5 Update traceback message 2003-05-07 17:11:15 +00:00
Skip Montanaro 45a9c93236 add missing parens - verified w/ interpreter - sorry to dismiss your comment
Fred
2003-05-07 16:01:43 +00:00
Skip Montanaro b4f12424a5 replace most uses of `...` by repr(...), noting that `...` is discouraged,
but convenient in interactive sessions.
2003-05-07 15:29:12 +00:00
Fred Drake 03e929e7e0 Fix some markup nits. 2003-04-22 14:30:53 +00:00
Alex Martelli a70b19147f Adding new built-in function sum, with docs and tests. 2003-04-22 08:12:33 +00:00
Raymond Hettinger 60de2e837f SF bug #699237: Tutorial uses omitted slice indices before explaining them
Moved up the explanation of slice default arguments.
2003-03-12 04:46:52 +00:00
Guido van Rossum 46d3dc37e4 - New function sys.exc_clear() clears the current exception. This is
rarely needed, but can sometimes be useful to release objects
  referenced by the traceback held in sys.exc_info()[2].  (SF patch
  #693195.)  Thanks to Kevin Jacobs!
2003-03-01 03:20:41 +00:00
Fred Drake d0c7137c8b 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:28:22 +00:00
Raymond Hettinger 7fbd01262c Clarify packages in tutorial. Closes SF bug #616211. 2002-10-26 03:13:57 +00:00
Fred Drake 55803bca98 Describe __path__ along with the rest of the package description.
Closes SF bug #626554.
2002-10-22 21:00:44 +00:00
Martin v. Löwis 36a4d8c20e Remove mentionings of DOS. 2002-10-10 18:24:54 +00:00
Raymond Hettinger 44c42b9cf3 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:06:04 +00:00
Raymond Hettinger a6e16a86c4 Replace all cases of "while 1" with "while True".
Though slightly slower, has better clarity and teaching value.
2002-08-21 04:54:00 +00:00
Michael W. Hudson dd32a91cc0 This is my patch
[ 587993 ] SET_LINENO killer

Remove SET_LINENO.  Tracing is now supported by inspecting co_lnotab.

Many sundry changes to document and adapt to this change.
2002-08-15 14:59:02 +00:00
Fred Drake 5c08a99b77 Remove a broken example of extreme backward compatibility; it is
simply not relevant any more.
Closes SF bug #595032.
2002-08-14 15:26:18 +00:00
Raymond Hettinger ae7ef57cba GvR pointed out that only enclosing function bodies are part of nested scopes. 2002-08-07 20:20:52 +00:00
Raymond Hettinger 861bb02448 Describe nested scopes in the tutorial. Closes SF bug 500704. 2002-08-07 16:09:48 +00:00
Fred Drake 33fd5f7e02 Fix typo reported to python-docs. 2002-06-26 21:25:15 +00:00
Raymond Hettinger 07dc91800f Close bug 480337: Dict used before dicts explained. Added explanation
and examples of the dict() constructor.
2002-06-25 15:13:18 +00:00
Raymond Hettinger 7951f60f45 Fix spacing in loop example 2002-06-25 03:17:03 +00:00
Fred Drake 55ad7f84a4 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:56:17 +00:00
Neal Norwitz d68f5171eb As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning).
Docs could be improved.
2002-05-29 15:54:55 +00:00
Andrew M. Kuchling e7bd876f9d Message for NameError has changed 2002-05-02 14:31:55 +00:00
Fred Drake 38f71973e5 Documentation for the enumerate() function/type.
This closes SF patch #547162.
2002-04-26 20:29:44 +00:00
Fred Drake 6cb64f9e46 "Shortcut" should be "short-circuit".
This closes SF bug #526277.
2002-03-08 00:54:43 +00:00
Fred Drake c26467d53f 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:53:30 +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
Fred Drake c37b65ee10 Clean up some markup cruft. A number of the macros that take no
parameters (like \UNIX) are commonly entered using an empty group to
separate the markup from a following inter-word space; this is not
needed when the next character is punctuation, or the markup is the
last thing in the enclosing group.  These cases were marked
inconsistently; the empty group is now *only* used when needed.
2001-11-28 07:26:15 +00:00
Fred Drake a815916472 Fix thinko in a comment about seeking with a file object.
Reported by Francesco Trentini.
2001-10-16 03:25:00 +00:00
Fred Drake 13af42822c Exceptions in interactive examlpes did not always include the indication of
the source file using "in ?".

Added a description of the bare "raise" statement.

Added more description and examples for user-defined exceptions; this
is part of a response to SF bug #443559.
2001-09-21 21:10:05 +00:00
Fred Drake ba5c41d4c5 Clarified the interaction between string literals and continuation lines.
Fixes bug reported as SF bug #453728.
2001-09-06 18:41:15 +00:00
Fred Drake 8b09f4985c Make the examples for "Default Argument Values" more presentable and
less hostile to newbie use at the interactive prompt.
This is in response to SF bug #458654.
2001-09-06 18:21:30 +00:00
Fred Drake d3ba10f4b5 Clarify the prompt in an example.
This closes SF bug #450633.
2001-08-14 19:55:42 +00:00
Fred Drake 20c94913de Minor re-wording in the exaplantion of sequence comparisons.
This closes SF bug #445749.
2001-08-01 17:17:13 +00:00
Fred Drake 01815526e0 Add a more substantial example startup file for the interactive shell;
sample startup script provided by Itamar Shtull-Trauring.

This closes SF patch #410890.

Add some logical markup where it was missing.
2001-07-18 19:21:12 +00:00
Fred Drake 17f690f96b Minor changes to match the style guide. 2001-07-14 02:14:42 +00:00
Fred Drake ed51494666 Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.
2001-07-06 17:28:39 +00:00
Fred Drake 88e66254f9 Use the more conventional "self" as the name of the self parameter in an
example.  It actually confused a reader.
2001-06-29 17:50:57 +00:00
Fred Drake d5df09cfb6 Update to include the license information in a less annoying place. 2001-06-20 21:37:34 +00:00
Tim Peters fa9e273442 Clarification in the fp appendix suggested on c.l.py by Michael Chermside.
Also replaced a *star* style emphasis in the Representation Error section
with an \emph{} thingie.
2001-06-17 21:57:17 +00:00
Fred Drake 7bc50714fe Fix the attributions for the new floating point text. 2001-06-08 17:09:01 +00:00
Fred Drake 8c27d99941 Added credits in the right places. 2001-06-08 16:28:53 +00:00
Fred Drake 417d667dd9 Text from Tim & Guido discussing floating point arithmetic and what users
need to understand about the binary & decimal fp, so that representation
weirdness is documented somewhere.  This makes it easier to repond to "bug"
reports caused by user confusion & ignorance of the issues.

This closes SF patch #426208.
2001-06-08 16:24:58 +00:00
Tim Peters bd695a716d Changed all the examples with ugly platform-dependent float output to use
numbers that display nicely after repr().  From much doctest experience
with the same trick, I believe people find examples with simple fractions
easier to understand too:  they can usually check the results in their
head, and so feel confident about what they're seeing.  Not even I get a
warm feeling from a result that looks like 70330.345024097141 ...
2001-05-22 06:54:14 +00:00