[Python Home] [PEP Index] [PEP Source] |
PEP: | 3000 |
---|---|
Title: | Python 3.0 Plans |
Version: | 41901 |
Last-Modified: | 2006-01-03 00:22:57 -0800 (Tue, 03 Jan 2006) |
Author: | A.M. Kuchling <amk at amk.ca>, Brett Cannon <drifty at alum.berkeley.edu> |
Status: | Draft |
Type: | Informational |
Content-Type: | text/x-rst |
Created: | 20-Aug-2004 |
Post-History: |
This PEP describes the changes currently envisioned in Python 3.0 (also called Python 3000), 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.
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]
To be removed:
The lambda statement: use nested or named functions [1], [9]
String exceptions: use instances of an Exception class [2]
raise Exception, "message": use raise Exception("message") [14]
`x`: use repr(x) [2]
The <> operator: use != instead [3]
Unbound methods [7]
METH_OLDARGS
__getslice__, __setslice__, __delslice__ [17]
C APIs (see code): PyFloat_AsString, PyFloat_AsReprString, PyFloat_AsStringEx, PySequence_In, PyEval_EvalFrame, PyEval_CallObject, _PyObject_Del, _PyObject_GC_Del, _PyObject_GC_Track, _PyObject_GC_UnTrack PyString_AsEncodedString, PyString_AsDecodedString
typedefs: intargfunc, intintargfunc
To be removed:
To be removed:
To be removed:
Deprecated modules, methods, parameters, attributes, etc. [1] [17] [18] There may be other modules, the most common are listed below.
sys.exitfunc: use atexit module instead [17]
sys.exc_type, sys.exc_values, sys.exc_traceback: not thread-safe; use sys.exc_info() or an attribute of the exception [2] [13] [17]
array.read, array.write [17]
operator.isCallable, operator.sequenceIncludes [17]
[1] | (1, 2, 3, 4, 5, 6, 7, 8) PyCon 2003 State of the Union: http://www.python.org/doc/essays/ppt/pycon2003/pycon2003.ppt |
[2] | (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13) Python Regrets: http://www.python.org/doc/essays/ppt/regrets/PythonRegrets.pdf |
[3] | (1, 2) Python Wiki: http://www.python.org/moin/Python3.0 |
[4] | python-dev email ("Constancy of None") http://mail.python.org/pipermail/python-dev/2004-July/046294.html |
[5] | python-dev email (' "as" to be a keyword?') http://mail.python.org/pipermail/python-dev/2004-July/046316.html |
[6] | python-dev email ("Comparing heterogeneous types") http://mail.python.org/pipermail/python-dev/2004-June/045111.html |
[7] | python-dev email ("Let's get rid of unbound methods") http://mail.python.org/pipermail/python-dev/2005-January/050625.html |
[8] | python-dev email ("Fixing _PyEval_SliceIndex so that integer-like objects can be used") http://mail.python.org/pipermail/python-dev/2005-February/051674.html |
[9] | (1, 2, 3) 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 |
[13] | (1, 2) python-dev email ("anonymous blocks") http://mail.python.org/pipermail/python-dev/2005-April/053060.html |
[14] | python-dev email ("PEP 8: exception style") http://mail.python.org/pipermail/python-dev/2005-August/055190.html |
[15] | python-dev email (Remove str.find in 3.0?) http://mail.python.org/pipermail/python-dev/2005-August/055705.html |
[16] | python-dev email (Replacement for print in Python 3.0) http://mail.python.org/pipermail/python-dev/2005-September/056154.html |
[18] | (1, 2, 3) PEP 4 ("Deprecation of Standard Modules") http://www.python.org/peps/pep-0004.html |
[19] | PEP 328 ("Imports: Multi-Line and Absolute/Relative") http://www.python.org/peps/pep-0328.html |
[20] | PEP 352 ("Required Superclass for Exceptions") http://www.python.org/peps/pep-0352.html |
This document has been placed in the public domain.