Python 2.7 parser bug on syntax for set literals ?
Jerry Hill
malaclypse2 at gmail.com
Sun Oct 24 00:56:50 EDT 2010
On Sun, Oct 24, 2010 at 12:40 AM, Steve Howe <howesteve at googlemail.com> wrote:
> Hello,
>
> This looks like a parser bug, but it's so basic I'm in doubt. Can
> anyone confirm ?
>
>>>> import sys
>>>> sys.version
> '2.7.0+ (r27:82500, Sep 15 2010, 18:14:55) \n[GCC 4.4.5]'
>>>> ({'', 1}.items())
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'set' object has no attribute 'items'
I don't see anything in the docs that indicates that set objects have
a .items() method. http://docs.python.org/library/stdtypes.html#set
Python 3.1 is the same.
--
Jerry
More information about the Python-list
mailing list