Various status updates.
This commit is contained in:
parent
00d28204ef
commit
1a0fce58f3
34
pep-3100.txt
34
pep-3100.txt
|
@ -69,16 +69,15 @@ Core language
|
||||||
* Support only new-style classes; classic classes will be gone [1]_ [done]
|
* Support only new-style classes; classic classes will be gone [1]_ [done]
|
||||||
* Replace ``print`` by a function [14]_ [#pep3105]_ [done]
|
* Replace ``print`` by a function [14]_ [#pep3105]_ [done]
|
||||||
* The ``softspace`` attribute of files goes away. [done]
|
* The ``softspace`` attribute of files goes away. [done]
|
||||||
* Use ``except E1, E2, E3 as err:`` if you want the error variable. [3]_
|
* Use ``except E1, E2, E3 as err:`` if you want the error variable. [3]_ [done]
|
||||||
* ``None`` becomes a keyword [4]_ [done; also ``True`` and ``False``]
|
* ``None`` becomes a keyword [4]_; also ``True`` and ``False`` [done]
|
||||||
* ``...`` to become a general expression element [16]_ [done]
|
* ``...`` to become a general expression element [16]_ [done]
|
||||||
* ``as`` becomes a keyword [5]_ (starting in 2.6 already) [done]
|
* ``as`` becomes a keyword [5]_ (starting in 2.6 already) [done]
|
||||||
* Have list comprehensions be syntactic sugar for passing an
|
* Have list comprehensions be syntactic sugar for passing an
|
||||||
equivalent generator expression to ``list()``; as a consequence the
|
equivalent generator expression to ``list()``; as a consequence the
|
||||||
loop variable will no longer be exposed [#pep289]_
|
loop variable will no longer be exposed [#pep289]_ [done]
|
||||||
* Comparisons other than ``==`` and ``!=`` between disparate types
|
* Comparisons other than ``==`` and ``!=`` between disparate types
|
||||||
will raise an exception unless explicitly supported by the type [6]_ [done]
|
will raise an exception unless explicitly supported by the type [6]_ [done]
|
||||||
* Exceptions might grow an attribute to store the traceback [11]_
|
|
||||||
* floats will not be acceptable as arguments in place of ints for operations
|
* floats will not be acceptable as arguments in place of ints for operations
|
||||||
where floats are inadvertantly accepted (PyArg_ParseTuple() i & l formats)
|
where floats are inadvertantly accepted (PyArg_ParseTuple() i & l formats)
|
||||||
* Remove from ... import * at function scope. This means that functions
|
* Remove from ... import * at function scope. This means that functions
|
||||||
|
@ -86,8 +85,8 @@ Core language
|
||||||
* Imports [#pep328]_
|
* Imports [#pep328]_
|
||||||
+ Imports will be absolute by default. [done]
|
+ Imports will be absolute by default. [done]
|
||||||
+ Relative imports must be explicitly specified. [done]
|
+ Relative imports must be explicitly specified. [done]
|
||||||
+ Indirection entires in sys.modules will not be supported.
|
+ Indirection entires in sys.modules will not be supported. (what's this???)
|
||||||
* __init__.py might become optional in sub-packages. __init__.py will still
|
* __init__.py might become optional in sub-packages? __init__.py will still
|
||||||
be required for top-level packages.
|
be required for top-level packages.
|
||||||
* Cleanup the Py_InitModule() variants {,3,4} (also import and parser APIs)
|
* Cleanup the Py_InitModule() variants {,3,4} (also import and parser APIs)
|
||||||
* Cleanup the APIs exported in pythonrun, etc.
|
* Cleanup the APIs exported in pythonrun, etc.
|
||||||
|
@ -95,8 +94,8 @@ Core language
|
||||||
|
|
||||||
- List comprehensions will require parentheses around the iterables.
|
- List comprehensions will require parentheses around the iterables.
|
||||||
This will make list comprehensions more similar to generator comprehensions.
|
This will make list comprehensions more similar to generator comprehensions.
|
||||||
[x for x in 1, 2] will need to be: [x for x in (1, 2)]
|
[x for x in 1, 2] will need to be: [x for x in (1, 2)] [done]
|
||||||
- Lambdas may have to be parenthesized [#pep308]_
|
- Lambdas may have to be parenthesized [#pep308]_ [NO]
|
||||||
|
|
||||||
* __builtins__ should get a different name *or* completely unified
|
* __builtins__ should get a different name *or* completely unified
|
||||||
with __builtin__. Keeping both with confusingly similar spellings
|
with __builtin__. Keeping both with confusingly similar spellings
|
||||||
|
@ -122,7 +121,7 @@ To be removed:
|
||||||
* ```x```: use ``repr(x)`` [2]_ [done]
|
* ```x```: use ``repr(x)`` [2]_ [done]
|
||||||
* The ``<>`` operator: use ``!=`` instead [3]_ [done]
|
* The ``<>`` operator: use ``!=`` instead [3]_ [done]
|
||||||
* The __mod__ and __divmod__ special methods on float. [21]_
|
* The __mod__ and __divmod__ special methods on float. [21]_
|
||||||
* Might drop unbound methods? [7]_
|
* Might drop unbound methods? [7]_ [UNLIKELY]
|
||||||
* METH_OLDARGS
|
* METH_OLDARGS
|
||||||
* WITH_CYCLE_GC [done]
|
* WITH_CYCLE_GC [done]
|
||||||
* __getslice__, __setslice__, __delslice__ [#sequence-types]_;
|
* __getslice__, __setslice__, __delslice__ [#sequence-types]_;
|
||||||
|
@ -147,23 +146,22 @@ Atomic Types
|
||||||
literals with 'L' or 'l' suffix disappear [1]_ [done]
|
literals with 'L' or 'l' suffix disappear [1]_ [done]
|
||||||
* Make all strings be Unicode, and have a separate bytes() type [1]_
|
* Make all strings be Unicode, and have a separate bytes() type [1]_
|
||||||
The new string type will be called 'str'.
|
The new string type will be called 'str'.
|
||||||
[halfway done, in py3k-struni branch]
|
[largely done, in py3k-struni branch]
|
||||||
* Return iterable views instead of lists where appropriate for atomic
|
* Return iterable views instead of lists where appropriate for atomic
|
||||||
type methods (e.g. ``dict.keys()``, ``dict.values()``,
|
type methods (e.g. ``dict.keys()``, ``dict.values()``,
|
||||||
``dict.items()``, etc.); iter* methods will be removed. [done]
|
``dict.items()``, etc.); iter* methods will be removed. [done]
|
||||||
* Make ``string.join()`` stringify its arguments? [18]_
|
* Make ``string.join()`` stringify its arguments? [18]_
|
||||||
* Fix open() so it returns a ValueError if the mode is bad rather than IOError.
|
* Fix open() so it returns a ValueError if the mode is bad rather than IOError.
|
||||||
(This probably affects lots of places, we should review the exceptions
|
[done]
|
||||||
and fix them if inappropriate.)
|
|
||||||
|
|
||||||
To be removed:
|
To be removed:
|
||||||
|
|
||||||
* ``basestring.find()`` and ``basestring.rfind()``; use ``basestring.index()``
|
* ``basestring.find()`` and ``basestring.rfind()``; use ``basestring.index()``
|
||||||
or ``basestring.[r]partition()`` or
|
or ``basestring.[r]partition()`` or
|
||||||
or ``basestring.rindex()`` in a try/except block??? [13]_
|
or ``basestring.rindex()`` in a try/except block??? [13]_ [UNLIKELY]
|
||||||
* ``file.xreadlines()`` method [#file-object]_ [done]
|
* ``file.xreadlines()`` method [#file-object]_ [done]
|
||||||
* ``dict.setdefault()``? [15]_
|
* ``dict.setdefault()``? [15]_ [UNLIKELY]
|
||||||
* ``dict.has_key()`` method [done]
|
* ``dict.has_key()`` method; use ``in`` operator [done]
|
||||||
|
|
||||||
|
|
||||||
Built-in Namespace
|
Built-in Namespace
|
||||||
|
@ -171,8 +169,6 @@ Built-in Namespace
|
||||||
|
|
||||||
* Make built-ins return an iterator where appropriate (e.g. ``range()``,
|
* Make built-ins return an iterator where appropriate (e.g. ``range()``,
|
||||||
``zip()``, ``map()``, ``filter()``, etc.) [done]
|
``zip()``, ``map()``, ``filter()``, etc.) [done]
|
||||||
* Relevant functions should consume iterators (e.g. ``min()``,
|
|
||||||
``max()``) [They already do, since 2.2.]
|
|
||||||
* Remove ``input()`` and rename ``raw_input()`` to ``input()``.
|
* Remove ``input()`` and rename ``raw_input()`` to ``input()``.
|
||||||
If you need the old input(), use eval(input()). [done]
|
If you need the old input(), use eval(input()). [done]
|
||||||
* Introduce ``trunc()``, which would call the ``__trunc__()`` method on its
|
* Introduce ``trunc()``, which would call the ``__trunc__()`` method on its
|
||||||
|
@ -192,8 +188,8 @@ To be removed:
|
||||||
* ``intern()``: put in ``sys`` [2]_, [22]_ [done]
|
* ``intern()``: put in ``sys`` [2]_, [22]_ [done]
|
||||||
* ``reduce()``: write a loop instead [2]_, [9]_ [done]
|
* ``reduce()``: write a loop instead [2]_, [9]_ [done]
|
||||||
* ``xrange()``: use ``range()`` instead [1]_ [See range() above] [done]
|
* ``xrange()``: use ``range()`` instead [1]_ [See range() above] [done]
|
||||||
* ``StandardError``: this is a relic from the original exception hierachy; subclass
|
* ``StandardError``: this is a relic from the original exception hierachy;
|
||||||
``Exception`` instead. [done]
|
subclass ``Exception`` instead. [done]
|
||||||
|
|
||||||
|
|
||||||
Standard library
|
Standard library
|
||||||
|
|
Loading…
Reference in New Issue