Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} with
POP_JUMP_IF_{TRUE,FALSE} and JUMP_IF_{TRUE,FALSE}_OR_POP. This avoids executing
a POP_TOP on each conditional and sometimes allows the peephole optimizer to
skip a JUMP_ABSOLUTE entirely. It speeds up list comprehensions significantly.
........
Backport 69934: Register xrange() as a Sequence.
........
r69946 | brett.cannon | 2009-02-24 16:01:02 -0600 (Tue, 24 Feb 2009) | 2 lines
Expand upon test_site.test_s_option to try to debug its failure.
........
r69952 | raymond.hettinger | 2009-02-24 18:37:57 -0600 (Tue, 24 Feb 2009) | 1 line
Sync-up py3.1 doc updates for super().
........
r69953 | raymond.hettinger | 2009-02-24 18:39:47 -0600 (Tue, 24 Feb 2009) | 1 line
Restore Py2.x version of sample call to super().
........
r69955 | raymond.hettinger | 2009-02-24 18:52:37 -0600 (Tue, 24 Feb 2009) | 1 line
More markup and spelling fixes.
........
r69959 | raymond.hettinger | 2009-02-24 19:06:52 -0600 (Tue, 24 Feb 2009) | 1 line
Remove reference to zero argument form of super() in 2.x docs.
........
r69981 | raymond.hettinger | 2009-02-25 16:48:24 -0600 (Wed, 25 Feb 2009) | 1 line
Clarify Counter() docs.
........
r69983 | raymond.hettinger | 2009-02-25 18:05:24 -0600 (Wed, 25 Feb 2009) | 1 line
Jeffrey Yasskin [Wed, 25 Feb 2009 02:25:04 +0000 (02:25 +0000)]
http://bugs.python.org/issue4715
This patch by Antoine Pitrou optimizes the bytecode for conditional branches by
merging the following "POP_TOP" instruction into the conditional jump. For
example, the list comprehension "[x for x in l if not x]" produced the
following bytecode:
Notice that not only the code is shorter, but the conditional jump
(POP_JUMP_IF_TRUE) jumps right to the start of the loop instead of going through
the JUMP_ABSOLUTE at the end. "continue" statements are helped
similarly.
Furthermore, the old jump opcodes (JUMP_IF_FALSE, JUMP_IF_TRUE) have been
replaced by two new opcodes:
- JUMP_IF_TRUE_OR_POP, which jumps if true and pops otherwise
- JUMP_IF_FALSE_OR_POP, which jumps if false and pops otherwise
Refine docs for super() noting that sibling classes can
be called, not just parents. Add a comparison to getattr()
which has the same search order but also includes the type
itself.
Fix keyword arguments for itertools.count().
Step arg without a start arg was ignored.
........
r69838 | raymond.hettinger | 2009-02-21 02:58:42 -0600 (Sat, 21 Feb 2009) | 1 line
Speedup and simplify negative counter using count's new step argument.
........
Brett Cannon [Sat, 21 Feb 2009 03:15:37 +0000 (03:15 +0000)]
Do some cleanup in importlib:
+ Ditch using arguments to super().
+ Ditch subclassing from object directly.
+ Move directory check out of chaining path hook to file path hook/finder.
+ Rename some classes to better reflect they are finders, not importers.
Blocked revisions 69268,69516,69757,69761,69765,69770,69772,69777,69795 via svnmerge
........
r69268 | kristjan.jonsson | 2009-02-04 04:05:25 -0600 (Wed, 04 Feb 2009) | 1 line
issue 4804: Provide checks for the format string of strftime, and for the "mode" string of fopen on Windows. These strings are user provided from python and so we can avoid invoking the C runtime invalid parameter handler by first checking that they are valid.
........
r69516 | hirokazu.yamamoto | 2009-02-10 22:13:06 -0600 (Tue, 10 Feb 2009) | 2 lines
Issue #5204: Define _PyVerify_fd on VC6 to make
test_fdopen (test_os.py) pass.
........
r69757 | raymond.hettinger | 2009-02-18 23:34:35 -0600 (Wed, 18 Feb 2009) | 1 line
Add some cross-references to the docs. Simplify the python code equivalent for izip(). Supply an optional argument for the nth() recipe.
........
r69761 | raymond.hettinger | 2009-02-18 23:51:41 -0600 (Wed, 18 Feb 2009) | 1 line
Add an example for math.fsum() and elaborate on the accurary note.
........
r69765 | raymond.hettinger | 2009-02-19 00:55:03 -0600 (Thu, 19 Feb 2009) | 1 line
Add links to helpful external resources.
........
r69770 | raymond.hettinger | 2009-02-19 03:50:24 -0600 (Thu, 19 Feb 2009) | 1 line
Inline coefficients in gamma(). Add reflection formula. Add comments.
........
r69772 | vinay.sajip | 2009-02-19 06:31:32 -0600 (Thu, 19 Feb 2009) | 1 line
#5287: Add exception handling around findCaller() call to help out IronPython.
........
r69777 | jeroen.ruigrok | 2009-02-19 12:52:21 -0600 (Thu, 19 Feb 2009) | 3 lines
Since we recommend one module per import line, reflect this also in the
documentation.
........
r69795 | benjamin.peterson | 2009-02-19 21:31:23 -0600 (Thu, 19 Feb 2009) | 1 line
revert r69777 since all the experts agree that extra import lines distract from the code
........
Merged revisions 69576,69579-69580,69589,69619-69620,69633,69703-69704,69728-69730 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r69576 | georg.brandl | 2009-02-13 04:56:50 -0600 (Fri, 13 Feb 2009) | 1 line
#1661108: note that urlsafe encoded string can contain "=".
........
r69579 | georg.brandl | 2009-02-13 05:06:59 -0600 (Fri, 13 Feb 2009) | 2 lines
Fix warnings GCC emits where the argument of PyErr_Format is a single variable.
........
r69580 | georg.brandl | 2009-02-13 05:10:04 -0600 (Fri, 13 Feb 2009) | 2 lines
Fix warnings GCC emits where the argument of PyErr_Format is a single variable.
........
r69589 | martin.v.loewis | 2009-02-13 14:11:34 -0600 (Fri, 13 Feb 2009) | 2 lines
Move amd64 properties further to the top, so that they override
the linker options correctly.
........
r69619 | benjamin.peterson | 2009-02-14 11:00:51 -0600 (Sat, 14 Feb 2009) | 1 line
this needn't be a shebang line
........
r69620 | georg.brandl | 2009-02-14 11:01:36 -0600 (Sat, 14 Feb 2009) | 1 line
#5179: don't leak PIPE fds when child execution fails.
........
r69633 | hirokazu.yamamoto | 2009-02-15 03:19:48 -0600 (Sun, 15 Feb 2009) | 1 line
Issue 5229: Documentation for super() neglects to say what super() actually does
........
r69704 | raymond.hettinger | 2009-02-16 17:00:25 -0600 (Mon, 16 Feb 2009) | 1 line
Add explanation for super(type1, type2).
........
r69728 | georg.brandl | 2009-02-17 18:22:55 -0600 (Tue, 17 Feb 2009) | 2 lines
Blocked revisions 69414,69561,69604,69672,69689,69709,69715,69717,69739,69743 via svnmerge
........
r69414 | georg.brandl | 2009-02-07 12:49:54 -0600 (Sat, 07 Feb 2009) | 1 line
make "super only for new-style classes" a note.
........
r69561 | gregory.p.smith | 2009-02-12 21:00:00 -0600 (Thu, 12 Feb 2009) | 5 lines
- Issue #3745: Fix hashlib to always reject unicode and non buffer-api
supporting objects as input no matter how it was compiled (built in
implementations or external openssl library).
(backported from a py3k branch)
........
r69604 | raymond.hettinger | 2009-02-13 18:25:51 -0600 (Fri, 13 Feb 2009) | 1 line
Add keyword argument support to itertools.count().
........
r69672 | benjamin.peterson | 2009-02-16 08:54:34 -0600 (Mon, 16 Feb 2009) | 1 line
note functions that are not aliased to PyBytes_ #5280
........
r69689 | benjamin.peterson | 2009-02-16 15:09:09 -0600 (Mon, 16 Feb 2009) | 1 line
remove some PyBytes_* aliases that are not in 3.x
........
r69709 | raymond.hettinger | 2009-02-17 02:33:01 -0600 (Tue, 17 Feb 2009) | 1 line
Fix-up intro paragraph for collections docs.
........
r69715 | raymond.hettinger | 2009-02-17 05:00:27 -0600 (Tue, 17 Feb 2009) | 1 line
Fixup intro paragraphs for the itertools docs. Add some tables for quick reference.
........
r69717 | marc-andre.lemburg | 2009-02-17 06:48:19 -0600 (Tue, 17 Feb 2009) | 5 lines
Clarify the deprecation of platform.dist().
Add versionadded tags.
........
r69739 | raymond.hettinger | 2009-02-18 14:54:53 -0600 (Wed, 18 Feb 2009) | 1 line
Generalize the itertools.tee() recipe.
........
r69743 | raymond.hettinger | 2009-02-18 17:10:19 -0600 (Wed, 18 Feb 2009) | 1 line
Py3k warnings now automatically include -Qwarn for division.
........