[Python-ideas] syntax for set

Bruce Leban bruce at leapyear.org
Wed Nov 17 06:27:28 CET 2010


That would explain why no one uses C, C++, C#, Ruby, Java, Basic, Fortran,
etc. None of these languages have a simple literal for an empty set.

That's why we're all using Pascal which does have a set literal [].

--- Bruce :-)
Learn about security: http://j.mp/gruyere-security



On Tue, Nov 16, 2010 at 9:02 PM, average <dreamingforward at gmail.com> wrote:

> On Tue, Nov 16, 2010 at 11:32 AM, MRAB <python at mrabarnett.plus.com> wrote:
>
>> On 16/11/2010 11:59, Stefan Behnel wrote:
>>
>>> average, 16.11.2010 04:16:
>>>
>>>> The *only* glitch is the lack of an empty set notation. The idea of
>>>>
>>>>  dict() == {:}; set()=={};
>>>>> which would be the obvious choice if starting fresh,
>>>>> was considered but rejected by Guido as too disruptive
>>>>> and introducing another barrier between Python 2 and 3.
>>>>>
>>>>
>>>> I have to say that the *lack*of those two suggested literals are a sore
>>>> point for me (that along with the fact that dict doesn't inherit from
>>>> set).
>>>> Call me a nit-picker, but (without them) they are like sand in the vast
>>>> gearbox of my mind when using python3: small but disruptive. I would
>>>> argue
>>>> that the lack of them is what is *preventing* the adoption of python3.
>>>>
>>>
>>> I doubt that.
>>>
>>>  I doubt it too.
>>
>> Haha, of course you do.  If you didn't, it would've already been done.
> But don't mislead yourselves either, as members of the old guard (?), you
> never get to measure the users that walk away.   And you run into the easy
> trap of "false neutrals".
>
> marcos
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20101116/a9e06fef/attachment.html>


More information about the Python-ideas mailing list