cpython/Doc/whatsnew
Amaury Forgeot d'Arc ba117ef7e9 #4617: Previously it was illegal to delete a name from the local
namespace if it occurs as a free variable in a nested block.  This limitation
of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).

This sample was valid in 2.6, but fails to compile in 3.x without this change::

   >>> def f():
   ...     def print_error():
   ...        print(e)
   ...     try:
   ...        something
   ...     except Exception as e:
   ...        print_error()
   ...        # implicit "del e" here


This sample has always been invalid in Python, and now works::

   >>> def outer(x):
   ...     def inner():
   ...        return x
   ...     inner()
   ...     del x

There is no need to bump the PYC magic number: the new opcode is used
for code that did not compile before.
2010-09-10 21:39:53 +00:00
..
2.0.rst Fix some markup glitches. 2010-07-23 16:55:26 +00:00
2.1.rst Merged revisions 79797 via svnmerge from 2010-04-05 13:25:51 +00:00
2.2.rst Merged revisions 78859-78860 via svnmerge from 2010-03-12 10:06:40 +00:00
2.3.rst Merged revisions 75365,75394,75402-75403,75418,75459,75484,75592-75596,75600,75602-75607,75610-75613,75616-75617,75623,75627,75640,75647,75696,75795 via svnmerge from 2009-10-27 15:28:25 +00:00
2.4.rst Terminology fix: exceptions are raised, except in generator.throw(). 2010-08-03 12:06:29 +00:00
2.5.rst Fix some markup glitches. 2010-07-23 16:55:26 +00:00
2.6.rst Merged revisions 79307,79408,79430,79533,79542,79579-79580,79585-79587,79607-79608,79622,79717,79820,79822,79828,79862,79875,79923-79924,79941-79943,79945,79947,79951-79952 via svnmerge from 2010-04-11 16:12:57 +00:00
2.7.rst Clarify whatsnew entry for short float repr: roundtripping is not a new feature in 2.7. 2010-08-15 09:43:29 +00:00
3.0.rst Add note about changes to the `round` function between 2.x and 3.x. 2010-06-17 18:24:52 +00:00
3.1.rst #7794: describe 3.1 support for executing directories and zip archives 2010-02-22 15:24:43 +00:00
3.2.rst #4617: Previously it was illegal to delete a name from the local 2010-09-10 21:39:53 +00:00
index.rst include 3.2 in toctree 2009-06-28 21:41:24 +00:00