Issue1334468
Created on 2005-10-21.20:13:33 by cupdike, last changed 2005-11-16.00:40:00 by fwierzbicki.
Messages | |||
---|---|---|---|
msg1059 (view) | Author: Clark Updike (cupdike) | Date: 2005-10-21.20:13:33 | |
jython should return false when testing if a dictionary is a sequence type, but it returns true. Cpython 2.1-2.4 return false. jython 2.1 and 2.2a2: Jython 2.1 on java1.5.0_02 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> from operator import isSequenceType >>> isSequenceType({}) 1 cpython 2.1-2.4: Python 2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. >>> from operator import isSequenceType >>> isSequenceType({}) 0 This may be related to bug 738880 (which was fixed): http://sourceforge.net/tracker/?group_id=12867&atid=112867&func=detail&aid=738880 |
|||
msg1060 (view) | Author: Khalid Zuberi (kzuberi) | Date: 2005-11-15.21:20:11 | |
Logged In: YES user_id=18288 PyDictionary seems to inherit its isSequenceType() method from PyObject where it is defined to true. I notice that some other classes like PyInteger override this with: public boolean isSequenceType() { return false; } So perhaps the fix might be as simple as adding the same to PyDictionary? - kz |
|||
msg1061 (view) | Author: Frank Wierzbicki (fwierzbicki) | Date: 2005-11-15.22:01:31 | |
Logged In: YES user_id=193969 I think kzuberi is probably right -- I'll look into it. |
|||
msg1062 (view) | Author: Frank Wierzbicki (fwierzbicki) | Date: 2005-11-16.00:40:00 | |
Logged In: YES user_id=193969 Thanks to Khalid Zuberi (kzuberi) for the suggested fix. Closing. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2005-10-21 20:13:33 | cupdike | create |
Supported by Python Software Foundation,
Powered by Roundup