builtin set literal

faulkner faulkner891 at gmail.com
Wed Feb 14 21:17:53 EST 2007


On Feb 14, 11:55 am, Schüle Daniel <u... at rz.uni-karlsruhe.de> wrote:
> Hello,
>
> lst = list((1,2,3))
> lst = [1,2,3]
>
> t = tupel((1,2,3))
> t = (1,2,3)
>
> s = set((1,2,3))
> s = ...
>
> it would be nice feature to have builtin literal for set type
> maybe in P3 .. what about?
> s = <1,2,3>
>
> Regards, Daniel

sets aren't quite that useful or common. just use a list.
and '<' and '>' already have syntactic meanings.
and that would make python look more like C++, which nobody wants.




More information about the Python-list mailing list