[ python-Bugs-1048498 ] SystemError with deque

SourceForge.net noreply at sourceforge.net
Sun Oct 17 03:03:21 CEST 2004


Bugs item #1048498, was opened at 2004-10-16 18:05
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1048498&group_id=5470

Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: George Yoshida (quiver)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: SystemError with deque

Initial Comment:
If I run the following script, it causes a SystemError.
# start of program
from collections import deque

d1 = deque()
d2 = deque()

class A:
    def __eq__(self, other):
        d1.pop()
        d1.appendleft(1)
        return 1

d1.extend((0, 1))
d2.extend((A(), 1))

d1 == d2
# end of program

$ python2.4 deque_demo.py
Traceback (most recent call last):
  File "deque_demo.py", line 15, in ?
    d1 == d2
SystemError: error return without exception set

This error happens if
- __eq__ returns values that are interpreted as True.
- appendleft is used insted of append.

Tested on Python 2.4a3(Win) and python2.4 from CVS 
as of 2004/10/15.

I attached this program for convenience.

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-10-16 20:03

Message:
Logged In: YES 
user_id=80475

I think that has been fixed.  Please reverify with Py2.4b1
when it comes out.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1048498&group_id=5470


More information about the Python-bugs-list mailing list