Python 2.7 parser bug on syntax for set literals ?
Ned Deily
nad at acm.org
Sun Oct 24 01:41:48 EDT 2010
In article
<AANLkTimy1bToUG8WrxR==EJuN_4oPvSUqMZFD8dWZb2m at mail.gmail.com>,
Steve Howe <howesteve at googlemail.com> wrote:
> The whole point is, is not supposed to be a set; a set literal would
> end with "})". As you can see, there is no such construct in the
> string.
> It's just a dict inside parentheses. Somehow, the parser seems to
> think it's a set.
>>> type({'', 1})
<type 'set'>
>>> type({'': 1})
<type 'dict'>
--
Ned Deily,
nad at acm.org
More information about the Python-list
mailing list