[Python-bugs-list] [ python-Bugs-628842 ] Deprecate PyNumber_Check
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 27 Oct 2002 18:39:43 -0800
Bugs item #628842, was opened at 2002-10-25 17:35
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=628842&group_id=5470
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 4
Submitted By: Neil Schemenauer (nascheme)
>Assigned to: Neil Schemenauer (nascheme)
Summary: Deprecate PyNumber_Check
Initial Comment:
I think PyNumber_Check should be deprecated. An type
having tp_as_number does not mean it is a number. If we
don't depreciate it, perhaps we should modify the test.
For
example, we could check for a __int__ method.
Guido, if you decide what to do, assign the bug back to
me and I will work on a patch.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-10-27 21:39
Message:
Logged In: YES
user_id=6380
I agree that checking for tp_as_number is bogus. (Ditto for
sequence and mapping -- are these similarly naive?)
Is there any code that currently uses PyNumber_Check?
Depending on what it is used for, I'd make a different decision.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=628842&group_id=5470