[Python-3000] set literals
tomer filiba
tomerfiliba at gmail.com
Fri Jul 7 23:34:49 CEST 2006
str and unicode are *distinct* types. they may be related, but not in
the sense that type("hello") and type(r"hello") both return str.
moreover, you can say a set is a "kind of" a keys-only dict. in fact,
the first implementation of set used a dict, where the keys where the
elements of the set, and their value was always True.
-tomer
---------------
> From: Diogo Kollross <diogoko <at> gmail.com>
> Subject: Re: set literals
> Newsgroups: gmane.comp.python.python-3000.devel
> Date: 2006-07-07 20:45:15 GMT (41 minutes ago)
> > i had this idea -- since quoted literals can be prefixed by a letter
>> that alters their meaning, why not use the same semantics
>> with curly braces?
>
> String literals are always strings, no matter what kind of string as
> defined by the prefix. On the other hand, dictionaries and sets seems
> different enough for me to not see the second as a special case of the
> first.
>
> Sets literals are not top on my priority list, anyways... =]
>
> --
> diogoko
More information about the Python-3000
mailing list