Commit Graph

144 Commits

Author SHA1 Message Date
Georg Brandl
3c1983face Patch #1479438: add \keyword markup for "with". 2006-04-30 19:34:19 +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
fee3dfc061 Update with statement documentation to use same terminology as 2.5a1 implementation 2006-04-23 15:39:16 +00:00
Georg Brandl
e071b001ca bug #1462278: small fix in documentation of __op__ vs __rop__ methods 2006-04-01 07:23:08 +00:00
Georg Brandl
76a2caebed typos 2006-03-31 16:12:34 +00:00
Georg Brandl
4c974989d7 Add index entries for new-style/old-style class. 2006-03-31 15:12:16 +00:00
Neal Norwitz
d03b073e9b Add version added info for with statement and context managers 2006-03-28 05:51:02 +00:00
Phillip J. Eby
5d0f4c6193 Document the PEP 343 context manager protocol methods. 2006-03-27 19:59:34 +00:00
Guido van Rossum
38fff8c4e4 Checking in the code for PEP 357.
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
2006-03-07 18:50:55 +00:00
Armin Rigo
ddddd2f7e6 Updating the short blob about old/new-style classes to reflect (IMHO) more
precisely the motivation and the differences.

Added links to www.python.org/doc/newstyle.html and a footnote to warn against
the statement "x[i] is equivalent to x.__getitem__(i)", which already caused
many invalid bug reports on SF.
2005-12-26 18:06:17 +00:00
Andrew M. Kuchling
6af5239501 Add placeholder section on old and new-style classes 2005-12-04 16:07:15 +00:00
Fred Drake
59c61911ac add missing "and" 2005-10-30 04:29:49 +00:00
Georg Brandl
d430726b82 Better wording for integer ref entry. 2005-09-12 12:49:38 +00:00
Fred Drake
b3dfc0ae5e - fix typo report by email, only 1.5 years late
- fix several consistency nits relating to \method{...()}
2005-09-07 04:57:56 +00:00
Georg Brandl
7da4edac28 Clarify what is meant with "whole numbers". 2005-09-04 18:30:19 +00:00
Georg Brandl
15ad935568 __new__ is a static method 2005-08-26 12:56:22 +00:00
Georg Brandl
8fc18a2010 bug [ 1261229 ] __new__ is class method 2005-08-25 21:56:45 +00:00
Raymond Hettinger
a30616a88d SF bug #1249837: container methods raise KeyError not IndexError
Minor clarification.
2005-08-21 11:26:14 +00:00
Georg Brandl
1c330eb9eb Patch [ 1230615 ] Patch for (Doc) #1168746
Bug [ 1204734 ] incorrect description of __getattribute__
2005-07-02 10:27:31 +00:00
Raymond Hettinger
f21569e53d Fix typo. 2005-04-26 05:18:53 +00:00
Greg Ward
ff564d3391 SF #1156412: document the __new__() static method
(merge from release24-maint branch).
2005-03-08 01:10:20 +00:00
Raymond Hettinger
68804315e0 SF Patch #1093896: miscellaneous doc typos 2005-01-01 00:28:46 +00:00
Michael W. Hudson
5e897959db This is my patch
[ 1004703 ] Make func_name writable

plus fixing a couple of nits in the documentation changes spotted by MvL
and a Misc/NEWS entry.
2004-08-12 18:12:44 +00:00
Brett Cannon
a031a0870d Add a missing space. 2004-06-29 04:14:02 +00:00