Commit Graph

201 Commits

Author SHA1 Message Date
Fred Drake
4b8ec63114 add missing word 2006-04-27 00:20:14 +00:00
Nick Coghlan
a7e820a408 Move the PEP 343 documentation and implementation closer to the
terminology in the alpha 1 documentation.

 - "context manager" reverts to its alpha 1 definition
 - the term "context specifier" goes away entirely
 - contextlib.GeneratorContextManager is renamed GeneratorContext

There are still a number of changes relative to alpha 1:

  - the expression in the with statement is explicitly called the
    "context expression" in the language reference
  - the terms 'with statement context', 'context object' or 'with
    statement context' are used in several places instead of a bare
    'context'. The aim of this is to avoid ambiguity in relation to the
    runtime context set up when the block is executed, and the context
    objects that already exist in various application domains (such as
    decimal.Context)
  - contextlib.contextmanager is renamed to contextfactory
    This best reflects the nature of the function resulting from the
    use of that decorator
  - decimal.ContextManager is renamed to WithStatementContext
    Simple dropping the 'Manager' part wasn't possible due to the
    fact that decimal.Context already exists and means something
    different. WithStatementContext is ugly but workable.

A technically unrelated change snuck into this commit:
contextlib.closing now avoids the overhead of creating a
generator, since it's trivial to implement that particular
context manager directly.
2006-04-25 10:56:51 +00:00
Nick Coghlan
877cf234c9 Change PEP 343 related documentation to use the term context specifier instead of context object 2006-04-24 04:17:02 +00:00
Nick Coghlan
84faa85775 Add a Context Types section to parallel the Iterator Types section (uses the same terminology as the 2.5a1 implementation) 2006-04-23 15:13:32 +00:00
Georg Brandl
275935db8d document sys.maxint in std objects 2006-03-28 18:02:44 +00:00
Phillip J. Eby
168e99f6db Document objects that can be used with the `with` statement. 2006-03-28 00:13:10 +00:00
Neal Norwitz
6a91e94e66 SF bug # 1457358 and patch # 1458419, floor division not documented. Patch by Andy.
Will backport.
2006-03-25 21:25:30 +00:00
Georg Brandl
db815abc70 More \exception fixes. 2006-03-17 16:26:31 +00:00
Guido van Rossum
1968ad32cd - Patch 1433928:
- The copy module now "copies" function objects (as atomic objects).
  - dict.__getitem__ now looks for a __missing__ hook before raising
    KeyError.
  - Added a new type, defaultdict, to the collections module.
    This uses the new __missing__ hook behavior added to dict (see above).
2006-02-25 22:38:04 +00:00
Georg Brandl
1dc5a84aee Bug #801349: document that start/stop/step slice arguments can be None 2006-02-19 00:12:42 +00:00
Georg Brandl
a3a93ae7c8 Bug #1396471: Document that Windows' ftell() can return invalid
values for text files with UNIX-style line endings.
2006-01-20 09:14:36 +00:00
Georg Brandl
0f194234dc Bug #1394868: doc typos 2006-01-01 21:35:20 +00:00
Georg Brandl
75400db251 Bug #1389673: document correct return value of set methods 2005-12-26 23:55:56 +00:00
Georg Brandl
6ee339109f Remove reference to the "t" open() mode as it is platform dependent. 2005-12-15 21:34:29 +00:00
Walter Dörwald
d4bfe2c878 SF patch #1364946: Add a reference link from the dcoumentation of the encode
and decode methods to the documentation of the default error handlers.
2005-11-25 17:17:12 +00:00
Fred Drake
4094d04457 fix link to subsection (SF bug #1311674) 2005-10-03 14:25:40 +00:00
Raymond Hettinger
1a663911d2 Fix markup. 2005-08-18 21:27:11 +00:00
Georg Brandl
290f3829d7 Revert patch for 1162912. 2005-07-04 14:17:47 +00:00
Georg Brandl
f73b4b0077 bug [ 1162912 ] typesseq-mutable lacks note on combined key/cmp usage 2005-07-03 20:21:40 +00:00
Raymond Hettinger
452b6834f0 Cross reference the set built-ins with the sets module. 2005-07-01 23:18:36 +00:00
Raymond Hettinger
24d7521985 SF bug #1215887: String and list methods documentation deeply hidden
Make doc on specific types easier to find by listing them in the headings
for the abstract types.
2005-06-14 08:45:43 +00:00
Raymond Hettinger
dede3bdfa1 SF bug #1209411: divmod documentation shd reference // not / 2005-05-31 11:04:00 +00:00
Raymond Hettinger
7bebbe7673 SF bug #1202395: Description of string.lstrip() needs improvement
Clarify the role of the chars argument in the strip() methods.
2005-05-31 10:26:28 +00:00
Raymond Hettinger
631bfe602f SF bug #1209671: dict.popitem documentation should mention empty dict case 2005-05-27 10:43:55 +00:00
Raymond Hettinger
87bd3fe266 Correct swapped descriptions of empty string splits. 2005-04-19 04:29:44 +00:00