Serhiy Storchaka added the comment:
Looks as there is no easy fix of this issue. This issue is particular case of
issue232493.
--
resolution: - duplicate
stage: needs patch - resolved
status: open - closed
superseder: - UserString can not be used as string in calls to C routines
Ezio Melotti added the comment:
Not sure this is worth fixing, unless the fix is trivial.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16773
___
Serhiy Storchaka added the comment:
This is definitely non-trivial. 1-argument int() works with UserString because
__int__() method is defined for UserString (as __float__(), as __complex__()).
I.e. UserString looks as number-like for it. Unfortunately there is no way to
make a class be
Changes by Ed Campbell drescampb...@gmail.com:
--
nosy: +esc24
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16773
___
___
Python-bugs-list
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16773
___
___
New submission from Serhiy Storchaka:
In Python 3 int() accepts UserString argument without explicit base and reject
it with explicit base.
from collections import UserString
int(UserString('100'))
100
int(UserString('100'), 2)
Traceback (most recent call last):
File stdin, line 1, in
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16773
___
___
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16773
___
___