| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
| |
Python 2.5 added support for explicit relative import statements and
yield expressions, which were missing in the manual.
Also fix grammar productions that used the names from the Grammar file,
markup that broke the generated grammar.txt, and wrap some lines that
broke the pdf output. Will backport.
|
|
|
|
| |
from the previous check in.
|
|
|
|
|
| |
The old and the new class are still required to have the same slot
names, but the order in which they are specified is not relevant.
|
|
|
|
| |
and should return True or False otherwise.
|
|
|
|
|
|
|
| |
The next step of PEP 352 (for 2.6) causes raising a string exception to trigger
a TypeError. Trying to catch a string exception raises a DeprecationWarning.
References to string exceptions has been removed from the docs since they are
now just an error.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
value is obtained by invoking hash on the long int.
Fixes #1536021.
|
| |
|
| |
|
|
|
|
| |
the operation.
|
| |
|
| |
|
|
|
|
| |
objects of same type/of subclasses of the other.
|
| |
|
|
|
|
|
| |
varies between __main__ and other modules, and strongly suggest not touching
it but using __builtin__ if absolutely necessary
|
|
|
|
| |
Avoid obsolescence by directly referring to the section.
|
| |
|
| |
|
| |
|
|
|
|
| |
- Regenerate keyword lists with reswords.py.
|
|
|
|
| |
- add clarifying words
|
|
|
|
|
|
| |
nearly the same place.
They are same, so keep the original one and remove the later-added one.
|
| |
|
|
|
|
| |
of all remaining references to context objects that I could find. Without a __context__() method context objects no longer exist. Also get test_with working again, and adopt a suggestion from Neal for decimal.Context.get_manager()
|
| |
|
|
|
|
| |
guillemets; no need for magic here
|
|
|
|
|
|
|
|
| |
discussion.
There are two places of documentation that still mention __context__:
Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without
spending a whole lot of time thinking about it; and whatsnew, which Andrew
usually likes to change himself.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
instead of context object
|
|
|
|
| |
implementation
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was started by Mike Bland and completed by Guido
(with help from Neal).
This still needs a __future__ statement added;
Thomas is working on Michael's patch for that aspect.
There's a small amount of code cleanup and refactoring
in ast.c, compile.c and ceval.c (I fixed the lltrace
behavior when EXT_POP is used -- however I had to make
lltrace a static global).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
breaks the parser module, because it adds the if/else construct as well as
two new grammar rules for backward compatibility. If no one else fixes
parsermodule, I guess I'll go ahead and fix it later this week.
The TeX code was checked with texcheck.py, but not rendered. There is
actually a slight incompatibility:
>>> (x for x in lambda:0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: iteration over non-sequence
changes into
>>> (x for x in lambda: 0)
File "<stdin>", line 1
(x for x in lambda: 0)
^
SyntaxError: invalid syntax
Since there's no way the former version can be useful, it's probably a
bugfix ;)
|
|
|
|
| |
fixed typo in language reference
|
| |
|