Fill out some references for existing points.
This commit is contained in:
parent
c1ee09db09
commit
3543af0fb0
41
pep-3000.txt
41
pep-3000.txt
|
@ -41,23 +41,14 @@ obvious way of doing something is enough. [1]_
|
|||
Core language
|
||||
=============
|
||||
|
||||
* Remove distinction between int and long types. [1]_
|
||||
* True division becomes default behavior
|
||||
* Make all strings be Unicode, and have a separate bytes() type. [1]_
|
||||
* Remove distinction between int and long types [1]_
|
||||
* True division becomes default behavior [10]_
|
||||
* Make all strings be Unicode, and have a separate bytes() type [1]_
|
||||
* ``exec`` as a statement is not worth it -- make it a function
|
||||
* Add optional declarations for static typing
|
||||
* Support only new-style classes; classic classes will be gone. [1]_
|
||||
* Add a 'with' statement::
|
||||
|
||||
with self:
|
||||
.foo = [1, 2, 3]
|
||||
.bar(4, .foo)
|
||||
|
||||
* Return iterators instead of lists
|
||||
|
||||
- ``dict.keys()``, ``.values()``, ``.items()``
|
||||
- ``range()``, ``zip()``
|
||||
|
||||
* 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.)
|
||||
* Replace ``print`` by a function: ``write(x,y,z)``,
|
||||
``writeln(x,y,z)`` [2]_
|
||||
* Do something so you can catch multiple exceptions using ``except E1,
|
||||
|
@ -67,13 +58,13 @@ Core language
|
|||
* ``as`` becomes a keyword [5]_
|
||||
* 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.
|
||||
loop variable will no longer be exposed [12]_
|
||||
* Comparisons other than ``==`` and ``!=`` between disparate types
|
||||
will raise an exception unless explicitly supported by the type [6]_
|
||||
|
||||
To be removed:
|
||||
|
||||
* The ``lambda`` statement: use nested functions [1]_, [9]_
|
||||
* The ``lambda`` statement: use nested or named functions [1]_, [9]_
|
||||
* String exceptions: use instances of an Exception class [2]_
|
||||
* ```x```: use ``repr(x)`` [2]_
|
||||
* The ``<>`` operator: use ``!=`` instead [3]_
|
||||
|
@ -83,11 +74,12 @@ To be removed:
|
|||
Built-ins
|
||||
=========
|
||||
|
||||
* Make ``range()`` return an iterator
|
||||
* Make built-ins return an iterator where appropriate (e.g. ``range()``,
|
||||
``zip()``, etc.)
|
||||
* Relevant functions should consume iterators (e.g. ``min()``,
|
||||
``max()``)
|
||||
* Introduce ``trunc()``, which would call the ``__trunc__()`` method on its
|
||||
argument; suggested use if for objects like float where calling ``__int__()``
|
||||
argument; suggested use is for objects like float where calling ``__int__()``
|
||||
has data loss, but an integral representation is still desired [8]_
|
||||
|
||||
To be removed:
|
||||
|
@ -148,6 +140,15 @@ References
|
|||
.. [9] Guido's blog ("The fate of reduce() in Python 3000")
|
||||
http://www.artima.com/weblogs/viewpost.jsp?thread=98196
|
||||
|
||||
.. [10] PEP 238 ("Changing the Division Operator")
|
||||
http://www.python.org/peps/pep-0238.html
|
||||
|
||||
.. [11] Guido's blog ("Python Optional Typechecking Redux")
|
||||
http://www.artima.com/weblogs/viewpost.jsp?thread=89161
|
||||
|
||||
.. [12] PEP 289 ("Generator Expressions")
|
||||
http://www.python.org/peps/pep-0289.html
|
||||
|
||||
|
||||
Copyright
|
||||
=========
|
||||
|
|
Loading…
Reference in New Issue