[Python-checkins] r45903 - peps/trunk/pep-3100.txt
guido.van.rossum
python-checkins at python.org
Thu May 4 20:15:11 CEST 2006
Author: guido.van.rossum
Date: Thu May 4 20:15:10 2006
New Revision: 45903
Modified:
peps/trunk/pep-3100.txt
Log:
Third time trying to commit the new pronouncement about set literals. :-(
Also mention removing __mod__ and __divmod__ from float.
Modified: peps/trunk/pep-3100.txt
==============================================================================
--- peps/trunk/pep-3100.txt (original)
+++ peps/trunk/pep-3100.txt Thu May 4 20:15:10 2006
@@ -104,12 +104,12 @@
and semantics is evil.
* Attributes on functions of the form ``func_whatever`` will be renamed
``__whatever__`` [25]_
-* Set literals and comprehensions [27]_
- {/} means set(); {x} means set([x]); {x, y} means set([x, y]).
+* Set literals and comprehensions [27]_ [28]_
+ {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.
- The {/} part is still controversial.
To be removed:
@@ -117,6 +117,7 @@
* ``raise Exception, "message"``: use ``raise Exception("message")`` [14]_
* ```x```: use ``repr(x)`` [2]_
* The ``<>`` operator: use ``!=`` instead [3]_
+* The __mod__ and __divmod__ special methods on float. [29]_
* Unbound methods [7]_
* METH_OLDARGS, WITH_CYCLE_GC
* __getslice__, __setslice__, __delslice__ [17]_
@@ -317,6 +318,12 @@
.. [27] python-3000 email ("sets in P3K?")
http://mail.python.org/pipermail/python-3000/2006-April/001286.html
+ [28] python-3000 email ("sets in P3K?")
+ http://mail.python.org/pipermail/python-3000/2006-May/001666.html
+
+ [29] python-3000 email ("bug in modulus?")
+ http://mail.python.org/pipermail/python-3000/2006-May/001735.html
+
.. [#pep238] PEP 238 (Changing the Division Operator)
http://www.python.org/dev/peps/pep-0238
More information about the Python-checkins
mailing list