Mark Dickinson <dicki...@gmail.com> added the comment:

Here's a patch that does some general cleanup of the object->integer 
helper functions in the struct module;  in the process, it fixes this 
bug.  With this patch, all conversions from a PyObject to a C integer go 
through get_pylong, so they're all treated the same way.  Currently 
(i.e., without the patch) there's a lack of consistency in the way the 
various integer codes are handled---some codes emit a warning for float 
conversions and some ('q', 'Q') don't;  some codes will happily convert 
a Decimal instance, and others won't.  Some codes produce this strange 
'unsupported operand types' message and some don't, etc.

----------
versions: +Python 2.7 -Python 2.6
Added file: http://bugs.python.org/file14451/issue1741130.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1741130>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to