[Python-3000] sets in P3K?

Georg Brandl g.brandl at gmx.net
Sun Apr 30 22:22:32 CEST 2006


Greg Wilson wrote:
>> Ron Adam:
>> How about the '!' which is currently used indicate a python long and an
>> integer.  Here it would indicate the difference between a frozen
>> container and a mutable container.
>>      frozen_set = {1, 2, 3}!
>>      frozen_dict = {1:'a', 2:'b', 3:'c'}!
> 
> Greg Wilson:
> I mostly don't like suffix operators --- too easy to miss them when
> reading code (especially if the thing they're being applied to is more
> than a couple of symbols long).
> 
>> Nick Coghlan:
>> set() == set{}
>> set(x)              # No braced equivalent
>> set([x]) == set{x}  # Ignoring list comprehensions
>> set((x,)) == set{x}
>> set((a, b, c)) == set{a, b, c}
> 
> I would rather stick to what we have than introduce two notations for
> construction, call, subscripting, etc. --- Perl's [] vs. {} *always*
> causes headaches for newcomers.

And last time I looked they were gonna change it for Perl 6.

Georg



More information about the Python-3000 mailing list