[Python-checkins] python/nondist/peps pep-3000.txt,1.15,1.16

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Thu Apr 28 20:57:43 CEST 2005


Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14436

Modified Files:
	pep-3000.txt 
Log Message:
Fill out some references for existing points.


Index: pep-3000.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-3000.txt,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- pep-3000.txt	15 Mar 2005 19:43:34 -0000	1.15
+++ pep-3000.txt	28 Apr 2005 18:57:40 -0000	1.16
@@ -41,23 +41,14 @@
 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 @@
 * ``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 @@
 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 @@
 .. [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
 =========



More information about the Python-checkins mailing list