Repair footnote jumble.
This commit is contained in:
parent
789d2fe5ea
commit
90f8562b42
101
pep-3100.txt
101
pep-3100.txt
|
@ -65,19 +65,19 @@ Core language
|
|||
|
||||
* True division becomes default behavior [#pep238]_ [done]
|
||||
* ``exec`` as a statement is not worth it -- make it a function [done]
|
||||
* (Maybe) add optional declarations for static typing [11]_
|
||||
* (Maybe) add optional declarations for static typing [10]_
|
||||
* Support only new-style classes; classic classes will be gone [1]_ [done]
|
||||
* Replace ``print`` by a function [16]_
|
||||
* Replace ``print`` by a function [14]_
|
||||
* Use ``except E1, E2, E3 as err:`` if you want the error variable. [3]_
|
||||
* ``None`` becomes a keyword [4]_ (What about ``True``, ``False``?)
|
||||
* ``...`` to become a general expression element [24]_ [done]
|
||||
* ``...`` to become a general expression element [16]_ [done]
|
||||
* ``as`` becomes a keyword [5]_ (starting in 2.6 already) [done]
|
||||
* 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 [12]_
|
||||
loop variable will no longer be exposed [#pep289]_
|
||||
* Comparisons other than ``==`` and ``!=`` between disparate types
|
||||
will raise an exception unless explicitly supported by the type [6]_ [done]
|
||||
* Exceptions might grow an attribute to store the traceback [13]_
|
||||
* Exceptions might grow an attribute to store the traceback [11]_
|
||||
* floats will not be acceptable as arguments in place of ints for operations
|
||||
where floats are inadvertantly accepted (PyArg_ParseTuple() i & l formats)
|
||||
* Imports will be absolute by default. [done]
|
||||
|
@ -91,7 +91,7 @@ Core language
|
|||
- List comprehensions will require parentheses around the iterables.
|
||||
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)]
|
||||
- Lambdas may have to be parenthesized [23]_
|
||||
- Lambdas may have to be parenthesized [#pep308]_
|
||||
|
||||
* Builtin module init function names (PyMODINIT_FUNC) will be prefixed
|
||||
with _Py (or Py). Currently they aren't namespace safe since the names
|
||||
|
@ -100,29 +100,29 @@ Core language
|
|||
with __builtin__. Keeping both with confusingly similar spellings
|
||||
and semantics is evil.
|
||||
* Attributes on functions of the form ``func_whatever`` will be renamed
|
||||
``__whatever__`` [25]_
|
||||
* Set literals and comprehensions [27]_ [28]_ [done]
|
||||
``__whatever__`` [17]_
|
||||
* Set literals and comprehensions [19]_ [20]_ [done]
|
||||
{x} means set([x]); {x, y} means set([x, y]).
|
||||
{F(x) for x in S if P(x)} means set(F(x) for x in S if P(x)).
|
||||
NB. {range(x)} means set([range(x)]), NOT set(range(x)).
|
||||
There's no literal for an empty set; use set() (or {1}&{2} :-).
|
||||
There's no frozenset literal; they are too rarely needed.
|
||||
* Might reconsider PEP 299 [30]_: special __main__() function in modules.
|
||||
* Might reconsider PEP 299 [#pep299]_: special __main__() function in modules.
|
||||
* The ``__nonzero__`` special method will be renamed to ``__bool__``
|
||||
and have to return a bool. The typeobject slot will be called
|
||||
``tp_bool`` [32]_ [done]
|
||||
``tp_bool`` [23]_ [done]
|
||||
|
||||
To be removed:
|
||||
|
||||
* String exceptions: use instances of an Exception class [2]_ [done]
|
||||
* ``raise Exception, "message"``: use ``raise Exception("message")`` [14]_
|
||||
* ``raise Exception, "message"``: use ``raise Exception("message")`` [12]_
|
||||
* ```x```: use ``repr(x)`` [2]_ [done]
|
||||
* The ``<>`` operator: use ``!=`` instead [3]_ [done]
|
||||
* The __mod__ and __divmod__ special methods on float. [29]_
|
||||
* The __mod__ and __divmod__ special methods on float. [21]_
|
||||
* Might drop unbound methods? [7]_
|
||||
* METH_OLDARGS
|
||||
* WITH_CYCLE_GC [done]
|
||||
* __getslice__, __setslice__, __delslice__ [17]_;
|
||||
* __getslice__, __setslice__, __delslice__ [#sequence-types]_;
|
||||
remove slice opcodes and use slice objects.
|
||||
[Thomas Wouters is working on this in a branch]
|
||||
* C APIs (see code):
|
||||
|
@ -145,15 +145,15 @@ Atomic Types
|
|||
(e.g. ``dict.keys()``, ``dict.values()``, ``dict.items()``, etc.); iter*
|
||||
methods will be removed.
|
||||
Better: make keys(), etc. return views ala Java collections???
|
||||
* Make ``string.join()`` stringify its arguments? [26]_
|
||||
* Make ``string.join()`` stringify its arguments? [18]_
|
||||
|
||||
To be removed:
|
||||
|
||||
* ``basestring.find()`` and ``basestring.rfind()``; use ``basestring.index()``
|
||||
or ``basestring.[r]partition()`` or
|
||||
or ``basestring.rindex()`` in a try/except block??? [15]_
|
||||
or ``basestring.rindex()`` in a try/except block??? [13]_
|
||||
* ``file.xreadlines()`` method [#file-object]_ [done]
|
||||
* ``dict.setdefault()``? [22]_
|
||||
* ``dict.setdefault()``? [15]_
|
||||
* ``dict.has_key()`` method [done]
|
||||
|
||||
|
||||
|
@ -178,7 +178,7 @@ To be removed:
|
|||
* ``coerce()``: no longer needed [2]_
|
||||
* ``execfile()``, ``reload()``: use ``exec()`` [2]_
|
||||
* ``input()``: use ``eval(sys.stdin.readline())`` [2]_ [done]
|
||||
* ``intern()``, ``id()``: put in ``sys`` (?) [2]_, [31]_
|
||||
* ``intern()``, ``id()``: put in ``sys`` (?) [2]_, [22]_
|
||||
* ``map()``, ``filter()``: use list comprehensions instead??? [1]_, [9]_
|
||||
(Actually these can stay.)
|
||||
* ``reduce()``: write a loop instead [2]_, [9]_ [done]
|
||||
|
@ -201,11 +201,11 @@ To be removed:
|
|||
+ see docstrings and comments in the source
|
||||
- ``macfs``, ``new``, ``reconvert``, ``stringold``, ``xmllib``,
|
||||
``pcre``, ``pypcre``, ``strop``
|
||||
+ see PEP 4 [18]_
|
||||
+ see PEP 4 [#pep4]_
|
||||
- ``posixfile``, ``pre``, ``regsub``, ``rfc822``,
|
||||
``statcache``, ``string``, ``TERMIOS`` ``mimetools``,
|
||||
``MimeWriter``, ``mimify``, ``mpz``, ``rgbimage``
|
||||
+ Everything in lib-old [18]_
|
||||
+ Everything in lib-old [#pep4]_
|
||||
- ``Para``, ``addpack``, ``cmp``, ``cmpcache``, ``codehack``,
|
||||
``dircmp``, ``dump``, ``find``, ``fmt``, ``grep``,
|
||||
``lockfile``, ``newdir``, ``ni``, ``packmail``, ``poly``,
|
||||
|
@ -214,7 +214,7 @@ To be removed:
|
|||
* ``sys.exitfunc``: use atexit module instead [#sys-module]_
|
||||
* ``sys.exc_type``, ``sys.exc_values``, ``sys.exc_traceback``:
|
||||
not thread-safe; use ``sys.exc_info()`` or an attribute
|
||||
of the exception [2]_ [13]_ [#sys-module]_
|
||||
of the exception [2]_ [11]_ [#sys-module]_
|
||||
* ``array.read``, ``array.write`` [#array-module]_
|
||||
* ``operator.isCallable`` : ``callable()`` built-in is being removed
|
||||
[#operator-module]_
|
||||
|
@ -246,12 +246,6 @@ References
|
|||
.. [2] Python Regrets:
|
||||
http://www.python.org/doc/essays/ppt/regrets/PythonRegrets.pdf
|
||||
|
||||
.. [9] Guido's blog ("The fate of reduce() in Python 3000")
|
||||
http://www.artima.com/weblogs/viewpost.jsp?thread=98196
|
||||
|
||||
.. [11] Guido's blog ("Python Optional Typechecking Redux")
|
||||
http://www.artima.com/weblogs/viewpost.jsp?thread=89161
|
||||
|
||||
.. [3] Python Wiki:
|
||||
http://www.python.org/moin/Python3.0
|
||||
|
||||
|
@ -271,44 +265,50 @@ References
|
|||
objects can be used")
|
||||
http://mail.python.org/pipermail/python-dev/2005-February/051674.html
|
||||
|
||||
.. [13] python-dev email ("anonymous blocks")
|
||||
.. [9] Guido's blog ("The fate of reduce() in Python 3000")
|
||||
http://www.artima.com/weblogs/viewpost.jsp?thread=98196
|
||||
|
||||
.. [10] Guido's blog ("Python Optional Typechecking Redux")
|
||||
http://www.artima.com/weblogs/viewpost.jsp?thread=89161
|
||||
|
||||
.. [11] python-dev email ("anonymous blocks")
|
||||
http://mail.python.org/pipermail/python-dev/2005-April/053060.html
|
||||
|
||||
.. [14] python-dev email ("PEP 8: exception style")
|
||||
.. [12] 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?)
|
||||
.. [13] 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)
|
||||
.. [14] python-dev email (Replacement for print in Python 3.0)
|
||||
http://mail.python.org/pipermail/python-dev/2005-September/056154.html
|
||||
|
||||
.. [21] python-dev email
|
||||
http://mail.python.org/pipermail/python-dev/2006-February/061169.html
|
||||
|
||||
.. [22] python-dev email ("defaultdict")
|
||||
.. [15] python-dev email ("defaultdict")
|
||||
http://mail.python.org/pipermail/python-dev/2006-February/061261.html
|
||||
|
||||
.. [24] python-3000 email
|
||||
.. [16] python-3000 email
|
||||
http://mail.python.org/pipermail/python-3000/2006-April/000996.html
|
||||
|
||||
.. [25] python-3000 email ("Pronouncement on parameter lists")
|
||||
.. [17] python-3000 email ("Pronouncement on parameter lists")
|
||||
http://mail.python.org/pipermail/python-3000/2006-April/001175.html
|
||||
|
||||
.. [26] python-3000 email ("More wishful thinking")
|
||||
.. [18] python-3000 email ("More wishful thinking")
|
||||
http://mail.python.org/pipermail/python-3000/2006-April/000810.html
|
||||
|
||||
.. [27] python-3000 email ("sets in P3K?")
|
||||
.. [19] python-3000 email ("sets in P3K?")
|
||||
http://mail.python.org/pipermail/python-3000/2006-April/001286.html
|
||||
|
||||
.. [28] python-3000 email ("sets in P3K?")
|
||||
.. [20] python-3000 email ("sets in P3K?")
|
||||
http://mail.python.org/pipermail/python-3000/2006-May/001666.html
|
||||
|
||||
.. [29] python-3000 email ("bug in modulus?")
|
||||
.. [21] python-3000 email ("bug in modulus?")
|
||||
http://mail.python.org/pipermail/python-3000/2006-May/001735.html
|
||||
|
||||
.. [17] Python docs (Additional methods for emulation of sequence types)
|
||||
http://docs.python.org/ref/sequence-methods.html
|
||||
.. [22] SF patch "sys.id() and sys.intern()"
|
||||
http://www.python.org/sf/1601678
|
||||
|
||||
.. [23] python-3000 email ("__nonzero__ vs. __bool__")
|
||||
http://mail.python.org/pipermail/python-3000/2006-November/004524.html
|
||||
|
||||
.. [#sys-module] Python docs (sys -- System-specific parameters and functions)
|
||||
http://docs.python.org/lib/module-sys.html
|
||||
|
@ -322,27 +322,24 @@ References
|
|||
.. [#file-object] Python docs (File objects)
|
||||
http://docs.python.org/lib/bltin-file-objects.html
|
||||
|
||||
.. [18] PEP 4 ("Deprecation of Standard Modules")
|
||||
.. [#sequence-types] Python docs (Additional methods for emulation of sequence types)
|
||||
http://docs.python.org/ref/sequence-methods.html
|
||||
|
||||
.. [#pep4] PEP 4 ("Deprecation of Standard Modules")
|
||||
http://www.python.org/dev/peps/pep-0004
|
||||
|
||||
.. [#pep238] PEP 238 (Changing the Division Operator)
|
||||
http://www.python.org/dev/peps/pep-0238
|
||||
|
||||
.. [12] PEP 289 ("Generator Expressions")
|
||||
.. [#pep289] PEP 289 ("Generator Expressions")
|
||||
http://www.python.org/dev/peps/pep-0289
|
||||
|
||||
.. [30] PEP 299 ("Special __main__() function in modules")
|
||||
.. [#pep299] PEP 299 ("Special __main__() function in modules")
|
||||
http://www.python.org/dev/peps/pep-0299
|
||||
|
||||
.. [23] PEP 308 ("Conditional Expressions")
|
||||
.. [#pep308] PEP 308 ("Conditional Expressions")
|
||||
http://www.python.org/dev/peps/pep-0308
|
||||
|
||||
.. [31] SF patch "sys.id() and sys.intern()"
|
||||
http://www.python.org/sf/1601678
|
||||
|
||||
.. [32] python-3000 email ("__nonzero__ vs. __bool__")
|
||||
http://mail.python.org/pipermail/python-3000/2006-November/004524.html
|
||||
|
||||
.. [#pep328] PEP 328 (Imports: Multi-Line and Absolute/Relative)
|
||||
http://www.python.org/dev/peps/pep-0328
|
||||
|
||||
|
|
Loading…
Reference in New Issue