[issue16773] int() half-accepts UserString

2014-08-13 Thread Serhiy Storchaka
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

[issue16773] int() half-accepts UserString

2012-12-30 Thread Ezio Melotti
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 ___

[issue16773] int() half-accepts UserString

2012-12-30 Thread Serhiy Storchaka
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

[issue16773] int() half-accepts UserString

2012-12-25 Thread Ed Campbell
Changes by Ed Campbell drescampb...@gmail.com: -- nosy: +esc24 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16773 ___ ___ Python-bugs-list

[issue16773] int() half-accepts UserString

2012-12-25 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16773 ___ ___

[issue16773] int() half-accepts UserString

2012-12-24 Thread Serhiy Storchaka
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

[issue16773] int() half-accepts UserString

2012-12-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16773 ___ ___

[issue16773] int() half-accepts UserString

2012-12-24 Thread Chris Jerdonek
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16773 ___ ___