• Nick Coghlan's avatar
    Move the PEP 343 documentation and implementation closer to the · a7e820a4
    Nick Coghlan yazdı
    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.
    a7e820a4
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...