Add set literals.

Clarify that the new string type will be 'str'.
This commit is contained in:
Guido van Rossum 2006-04-27 17:48:03 +00:00
parent fe146e8d57
commit 5e7d3e4ad0
1 changed files with 10 additions and 0 deletions

View File

@ -104,6 +104,12 @@ Core language
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]).
{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 frozenset literal; they are too rarely needed.
The {/} part is still controversial.
To be removed:
@ -129,6 +135,7 @@ Atomic Types
* Remove distinction between int and long types [1]_
(int may become an abstract base type, with short and long subtypes.)
* Make all strings be Unicode, and have a separate bytes() type [1]_
The new string type will be called 'str'.
* Return iterators instead of lists where appropriate for atomic type methods
(e.g. ``dict.keys()``, ``dict.values()``, ``dict.items()``, etc.); iter*
methods will be removed
@ -307,6 +314,9 @@ References
.. [26] python-3000 email ("More wishful thinking")
http://mail.python.org/pipermail/python-3000/2006-April/000810.html
[27] python-3000 email ("sets in P3K?")
http://mail.python.org/pipermail/python-3000/2006-April/001286.html
.. [#pep238] PEP 238 (Changing the Division Operator)
http://www.python.org/dev/peps/pep-0238