markup, wrapping
This commit is contained in:
parent
2042beaefb
commit
13a33836fb
54
pep-3000.txt
54
pep-3000.txt
|
@ -29,6 +29,7 @@ are two authors of this PEP, we're just supplying the text; the
|
||||||
decisions for which changes are listed in this document are made by
|
decisions for which changes are listed in this document are made by
|
||||||
Guido van Rossum, who has chosen them as goals for Python 3.0.
|
Guido van Rossum, who has chosen them as goals for Python 3.0.
|
||||||
|
|
||||||
|
|
||||||
General goals
|
General goals
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
@ -42,7 +43,7 @@ Core language
|
||||||
|
|
||||||
* Remove distinction between int and long types. [1]_
|
* Remove distinction between int and long types. [1]_
|
||||||
* Make all strings be Unicode, and have a separate bytes() type. [1]_
|
* Make all strings be Unicode, and have a separate bytes() type. [1]_
|
||||||
* `exec` as a statement is not worth it -- make it a function
|
* ``exec`` as a statement is not worth it -- make it a function
|
||||||
* Add optional declarations for static typing
|
* Add optional declarations for static typing
|
||||||
* Support only new-style classes; classic classes will be gone. [1]_
|
* Support only new-style classes; classic classes will be gone. [1]_
|
||||||
* Add a 'with' statement::
|
* Add a 'with' statement::
|
||||||
|
@ -52,18 +53,19 @@ Core language
|
||||||
.bar(4, .foo)
|
.bar(4, .foo)
|
||||||
|
|
||||||
* Return iterators instead of lists
|
* Return iterators instead of lists
|
||||||
* `d.keys()`, `.values()`, `.items()`
|
* ``d.keys()``, ``.values()``, ``.items()``
|
||||||
* `range()`, `zip()`
|
* ``range()``, ``zip()``
|
||||||
* Replace `print` by a function: `write(x,y,z)`, `writeln(x,y,z)` [2]_
|
* Replace ``print`` by a function: ``write(x,y,z)``,
|
||||||
* Do something so you can catch multiple exceptions using `except E1,
|
``writeln(x,y,z)`` [2]_
|
||||||
E2, E3:`. Maybe use `except E1, E2, E3 as err:` if you want the error
|
* Do something so you can catch multiple exceptions using ``except E1,
|
||||||
variable? [3]_
|
E2, E3:``. Maybe use ``except E1, E2, E3 as err:`` if you want the
|
||||||
|
error variable? [3]_
|
||||||
|
|
||||||
To be removed:
|
To be removed:
|
||||||
|
|
||||||
* The `lambda` statement [1]_
|
* The ``lambda`` statement [1]_
|
||||||
* String exceptions [2]_
|
* String exceptions [2]_
|
||||||
* ``\`x\```: use `repr(x)` [2]_
|
* ```x```: use ``repr(x)`` [2]_
|
||||||
|
|
||||||
|
|
||||||
Built-ins
|
Built-ins
|
||||||
|
@ -71,24 +73,26 @@ Built-ins
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
* make `range()` return an iterator
|
* make ``range()`` return an iterator
|
||||||
* Relevant functions should consume iterators (e.g. `min()`, `max()`)
|
* Relevant functions should consume iterators (e.g. ``min()``,
|
||||||
|
``max()``)
|
||||||
|
|
||||||
|
|
||||||
To be removed:
|
To be removed:
|
||||||
|
|
||||||
* `apply()`: use `f(*args, **kw)` instead [2]_
|
* ``apply()``: use ``f(*args, **kw)`` instead [2]_
|
||||||
* `buffer()`: must die (use a bytes() type instead) [2]_
|
* ``buffer()``: must die (use a bytes() type instead) [2]_
|
||||||
* `callable()`: just call the object and catch the exception [2]_
|
* ``callable()``: just call the object and catch the exception [2]_
|
||||||
* `compile()`: put in `sys` (or perhaps in a module of its own) [2]_
|
* ``compile()``: put in ``sys`` (or perhaps in a module of its own)
|
||||||
* `coerce()`: no longer needed [2]_
|
[2]_
|
||||||
* `execfile()`, `reload()`: use `exec()` [2]_
|
* ``coerce()``: no longer needed [2]_
|
||||||
* `input()`: use `eval(sys.stdin.readline())` [2]_
|
* ``execfile()``, ``reload()``: use ``exec()`` [2]_
|
||||||
* `intern()`, `id()`: put in `sys` [2]_
|
* ``input()``: use ``eval(sys.stdin.readline())`` [2]_
|
||||||
* `map()`, `filter()`: use list comprehensions instead [1]_
|
* ``intern()``, ``id()``: put in ``sys`` [2]_
|
||||||
* `raw_input()`: use `sys.stdin.readline()` [2]_
|
* ``map()``, ``filter()``: use list comprehensions instead [1]_
|
||||||
* `reduce()`: write a loop instead [2]_
|
* ``raw_input()``: use ``sys.stdin.readline()`` [2]_
|
||||||
* `xrange()`: use `range()` instead [1]_
|
* ``reduce()``: write a loop instead [2]_
|
||||||
|
* ``xrange()``: use ``range()`` instead [1]_
|
||||||
|
|
||||||
|
|
||||||
Standard library
|
Standard library
|
||||||
|
@ -98,8 +102,8 @@ Reorganize the standard library into packages
|
||||||
|
|
||||||
To be removed:
|
To be removed:
|
||||||
|
|
||||||
* `string` and other deprecated modules [1]_
|
* ``string`` and other deprecated modules [1]_
|
||||||
* `sys.exc_type`: not thread-safe; use `sys.exc_info` [2]_
|
* ``sys.exc_type``: not thread-safe; use ``sys.exc_info`` [2]_
|
||||||
|
|
||||||
|
|
||||||
References
|
References
|
||||||
|
|
Loading…
Reference in New Issue