1. 25 Feb, 2009 3 commits
    • Jeffrey Yasskin's avatar
      http://bugs.python.org/issue4715 · 9de7ec78
      Jeffrey Yasskin authored
      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:
      
        1           0 BUILD_LIST               0
                    3 LOAD_FAST                0 (.0)
              >>    6 FOR_ITER                23 (to 32)
                    9 STORE_FAST               1 (x)
                   12 LOAD_FAST                1 (x)
                   15 JUMP_IF_TRUE            10 (to 28)
                   18 POP_TOP
                   19 LOAD_FAST                1 (x)
                   22 LIST_APPEND              2
                   25 JUMP_ABSOLUTE            6
              >>   28 POP_TOP
                   29 JUMP_ABSOLUTE            6
              >>   32 RETURN_VALUE
      
      but after the patch it produces the following bytecode:
      
        1           0 BUILD_LIST               0
                    3 LOAD_FAST                0 (.0)
              >>    6 FOR_ITER                18 (to 27)
                    9 STORE_FAST               1 (x)
                   12 LOAD_FAST                1 (x)
                   15 POP_JUMP_IF_TRUE         6
                   18 LOAD_FAST                1 (x)
                   21 LIST_APPEND              2
                   24 JUMP_ABSOLUTE            6
              >>   27 RETURN_VALUE
      
      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
      9de7ec78
    • Raymond Hettinger's avatar
      More markup and spelling fixes. · 0a68b01d
      Raymond Hettinger authored
      0a68b01d
    • Raymond Hettinger's avatar
      79d0434a
  2. 24 Feb, 2009 6 commits
  3. 23 Feb, 2009 5 commits
  4. 22 Feb, 2009 6 commits
  5. 21 Feb, 2009 13 commits
  6. 20 Feb, 2009 7 commits
    • Mark Dickinson's avatar
      More typos in Lib/turtle.py · f8798f57
      Mark Dickinson authored
      f8798f57
    • Mark Dickinson's avatar
      Merged revisions 69816 via svnmerge from · 0fc61ccb
      Mark Dickinson authored
      svn+ssh://pythondev@svn.python.org/python/trunk
      
      ........
        r69816 | mark.dickinson | 2009-02-20 20:42:53 +0000 (Fri, 20 Feb 2009) | 2 lines
      
        Issue #5295: Typos in turtle.py
      ........
      0fc61ccb
    • Eric Smith's avatar
      Merged revisions 69806 via svnmerge from · 5e5c0db5
      Eric Smith authored
      svn+ssh://pythondev@svn.python.org/python/trunk
      
      ........
        r69806 | eric.smith | 2009-02-20 09:02:36 -0500 (Fri, 20 Feb 2009) | 1 line
      
        Issue #5247: Improve error message when unknown format codes are used when using str.format() with str, int, and float arguments.
      ........
      5e5c0db5
    • Benjamin Peterson's avatar
      Merged revisions 69415,69591,69593 via svnmerge from · 247a9b87
      Benjamin Peterson authored
      svn+ssh://pythondev@svn.python.org/python/trunk
      
      ........
        r69415 | benjamin.peterson | 2009-02-07 13:08:22 -0600 (Sat, 07 Feb 2009) | 1 line
      
        make destinsrc private
      ........
        r69591 | martin.v.loewis | 2009-02-13 14:26:16 -0600 (Fri, 13 Feb 2009) | 1 line
      
        Update Tix build procedure.
      ........
        r69593 | martin.v.loewis | 2009-02-13 14:51:48 -0600 (Fri, 13 Feb 2009) | 1 line
      
        Add optional code signing after merging.
      ........
      247a9b87
    • Benjamin Peterson's avatar
      Merged revisions 69769,69776 via svnmerge from · ba01dd93
      Benjamin Peterson authored
      svn+ssh://pythondev@svn.python.org/python/trunk
      
      ........
        r69769 | georg.brandl | 2009-02-19 02:30:06 -0600 (Thu, 19 Feb 2009) | 1 line
      
        #5310, #3558: fix operator precedence table.
      ........
        r69776 | georg.brandl | 2009-02-19 10:34:51 -0600 (Thu, 19 Feb 2009) | 2 lines
      
        #5317: update IronPython URL.
      ........
      ba01dd93
    • Benjamin Peterson's avatar
      Blocked revisions 69268,69516,69757,69761,69765,69770,69772,69777,69795 via svnmerge · 93d83da8
      Benjamin Peterson authored
      ........
        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
      ........
      93d83da8
    • Benjamin Peterson's avatar
      fix None errno #5312 · 4b068190
      Benjamin Peterson authored
      4b068190