On 1/15/06, Alex Martelli <[EMAIL PROTECTED]> wrote: > Now, today, I have _again_ been bit by the lack of basenumber (by a > bug of mine, fixed by adding decimal.Decimal to a long tuple of > classes to be passed to an isinstance call -- I hadn't run that > particular numeric code of mine since the time of Python 2.3, > apparently), so I'm back to pining for it.
As you already suspected, I think a PEP is needed. The intent of basestring was to *only* be used as the base class for *built-in* string types. Clearly what you're proposing is different (Decimal is not built-in -- not yet anyway). Like other posters, I suspect that the best way of detecting numbers might be some other kind of test, not necessarily a call to isinstance(). It would also help to explain the user case more. ("I've been bitten" doesn't convey a lot of information. :-) -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com