343: fix bug in nested().
356: add some tentative future keywords. 3000: add some new ideas.
This commit is contained in:
parent
31ace078cc
commit
1b6075f020
|
@ -827,7 +827,6 @@ Examples
|
|||
def nested(*contexts):
|
||||
exits = []
|
||||
vars = []
|
||||
exc = (None, None, None)
|
||||
try:
|
||||
try:
|
||||
for context in contexts:
|
||||
|
@ -839,6 +838,8 @@ Examples
|
|||
yield vars
|
||||
except:
|
||||
exc = sys.exc_info()
|
||||
else:
|
||||
exc = (None, None, None)
|
||||
finally:
|
||||
while exits:
|
||||
exit = exits.pop()
|
||||
|
@ -846,6 +847,8 @@ Examples
|
|||
exit(*exc)
|
||||
except:
|
||||
exc = sys.exc_info()
|
||||
else:
|
||||
exc = (None, None, None)
|
||||
if exc != (None, None, None):
|
||||
raise
|
||||
|
||||
|
|
|
@ -75,6 +75,13 @@ Planned features for 2.5
|
|||
Target for inclusion of each feature by March 16. At that point,
|
||||
we should re-evaluate schedule or consider dropping feature.
|
||||
|
||||
Prepare for 'do' becoming a keyword in 2.6 (PEP 315)?
|
||||
And as long as we're going wild, how about 'super'?
|
||||
And what about 'interface' and 'implements'? (PEP 245)
|
||||
Or 'switch' and 'case'? (PEP 275)
|
||||
|
||||
Add builtin @deprecated decorator?
|
||||
|
||||
PEP 352: Required Superclass for Exceptions
|
||||
(Brett Cannon is expected to implement this.)
|
||||
|
||||
|
|
|
@ -54,12 +54,17 @@ Core language
|
|||
* ``exec`` as a statement is not worth it -- make it a function
|
||||
* Add optional declarations for static typing [11]_
|
||||
* Support only new-style classes; classic classes will be gone [1]_
|
||||
* Return iterators instead of lists where appropriate for atomic type methods
|
||||
(e.g. ``dict.keys()``, ``dict.values()``, ``dict.items()``, etc.)
|
||||
iter*() methods will be removed.
|
||||
* OR... Make keys() etc. return "views" a la Java collections???
|
||||
* Replace ``print`` by a function [16]_
|
||||
* Do something so you can catch multiple exceptions using ``except E1,
|
||||
E2, E3:``. Maybe use ``except E1, E2, E3 as err:`` if you want the
|
||||
error variable? [3]_
|
||||
* ``None``, ``True`` and ``False`` become keywords [4]_
|
||||
* ``as`` becomes a keyword [5]_
|
||||
(Or perhaps just ``None``?)
|
||||
* ``as`` becomes a keyword [5]_ (probably in 2.6 already)
|
||||
* Have list comprehensions be syntactic sugar for passing an
|
||||
equivalent generator expression to ``list()``; as a consequence the
|
||||
loop variable will no longer be exposed [12]_
|
||||
|
|
Loading…
Reference in New Issue