[ python-Bugs-1117757 ] "in" operator bug ?
SourceForge.net
noreply at sourceforge.net
Mon Feb 7 10:16:32 CET 2005
Bugs item #1117757, was opened at 2005-02-07 10:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1117757&group_id=5470
Category: Python Interpreter Core
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrea Bolzonella (bolzonella)
Assigned to: Nobody/Anonymous (nobody)
Summary: "in" operator bug ?
Initial Comment:
my python :
Python 2.4 (#1, Dec 8 2004, 18:57:30)
[GCC 3.3.3 (SuSE Linux)] on linux
>>class C(object):
>> def __getitem__ (self, name):
>> return 1
>> c =C()
>> 'a' in c
here python never returns and CPU 100%
this version works:
>>class C(object):
>> def __getitem__ (self, name):
>> raise StopIteration
>> c =C()
>> 'a' in c
False
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1117757&group_id=5470
More information about the Python-bugs-list
mailing list