From b5815e3e638834e28233fc2043026707c5bf5e95 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 20 Aug 2004 12:43:19 +0000 Subject: [PATCH] Add PEP 3000 --- pep-0000.txt | 3 ++ pep-3000.txt | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 pep-3000.txt diff --git a/pep-0000.txt b/pep-0000.txt index c2623f5d0..d4b5f1064 100644 --- a/pep-0000.txt +++ b/pep-0000.txt @@ -57,6 +57,7 @@ Index by Category I 291 Backward Compatibility for Standard Library Norwitz I 306 How to Change Python's Grammar Hudson I 320 Python 2.4 Release Schedule Warsaw + I 3000 Python 3.0 Plans Kuchling, Cannon Accepted PEPs (accepted; may not be implemented yet) @@ -357,6 +358,7 @@ Numerical Index S 331 Locale-Independent Float/String conversions Reis SR 666 Reject Foolish Indentation Creighton S 754 IEEE 754 Floating Point Special Values Warnes + I 3000 Python 3.0 Plans Kuchling, Cannon Key @@ -383,6 +385,7 @@ Owners Batista, Facundo facundo@taniquetil.com.ar Baxter, Anthony anthony@interlink.com.au Bellman, Thomas bellman+pep-divmod@lysator.liu.se + Cannon, Brett drifty@alum.berkeley.edu Carlson, Josiah jcarlson@uci.edu Carroll, W Isaac icarroll@pobox.com Cole, Dave djc@object-craft.com.au diff --git a/pep-3000.txt b/pep-3000.txt new file mode 100644 index 000000000..37c8eaf64 --- /dev/null +++ b/pep-3000.txt @@ -0,0 +1,131 @@ +PEP: 3000 +Title: Python 3.0 Plans +Version: $Revision$ +Last-Modified: $Date$ +Author: A.M. Kuchling , + Brett Cannon +Status: Draft +Type: Informational +Content-Type: text/x-rst +Created: 20-Aug-2004 +Post-History: + + +Abstract +======== + +This PEP describes the changes currently envisioned in Python 3.0, a +hypothetical future release of Python that can break backwards +compatibility with the existing body of Python code. + +The list of features included in this document is subject to change +and isn't binding on the Python development community; features may be +added, removed, and modified at any time. The purpose of this list is +to focus our language development effort on changes that are steps to +3.0, and to encourage people to invent ways to smooth the transition. + +This document is not a wish-list that anyone can extend. While there +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 +Guido van Rossum, who has chosen them as goals for Python 3.0. + +General goals +============= + +A general goal is to reduce feature duplication by removing old ways +of doing things. A general principle of the design will be that one +obvious way of doing something is enough. [1]_ + + +Core language +============= + +* Remove distinction between int and long types. [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 +* 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 +* `d.keys()`, `.values()`, `.items()` +* `range()`, `zip()` +* 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, + E2, E3:`. Maybe use `except E1, E2, E3 as err:` if you want the error + variable? [3]_ + +To be removed: + +* The `lambda` statement [1]_ +* String exceptions [2]_ +* ``\`x\```: use `repr(x)` [2]_ + + +Built-ins +========= + +Changes: + +* make `range()` return an iterator +* Relevant functions should consume iterators (e.g. `min()`, `max()`) + + +To be removed: + +* `apply()`: use `f(*args, **kw)` instead [2]_ +* `buffer()`: must die (use a bytes() type instead) [2]_ +* `callable()`: just call the object and catch the exception [2]_ +* `compile()`: put in `sys` (or perhaps in a module of its own) [2]_ +* `coerce()`: no longer needed [2]_ +* `execfile()`, `reload()`: use `exec()` [2]_ +* `input()`: use `eval(sys.stdin.readline())` [2]_ +* `intern()`, `id()`: put in `sys` [2]_ +* `map()`, `filter()`: use list comprehensions instead [1]_ +* `raw_input()`: use `sys.stdin.readline()` [2]_ +* `reduce()`: write a loop instead [2]_ +* `xrange()`: use `range()` instead [1]_ + + +Standard library +================ + +Reorganize the standard library into packages + +To be removed: + +* `string` and other deprecated modules [1]_ +* `sys.exc_type`: not thread-safe; use `sys.exc_info` [2]_ + + +References +========== + +.. [1] PyCon 2003 State of the Union: + http://www.python.org/doc/essays/ppt/pycon2003/pycon2003.ppt + +.. [2] Python Regrets: + http://www.python.org/doc/essays/ppt/regrets/PythonRegrets.pdf + +.. [3] Python Wiki: + http://www.python.org/moin/Python3.0 + + +Copyright +========= + +This document has been placed in the public domain. + + + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: