[Python-Dev] Re: unicode inconsistency?
Aahz
aahz at pythoncraft.com
Thu Sep 9 22:21:13 CEST 2004
On Thu, Sep 09, 2004, Fredrik Lundh wrote:
>
> I'm beginning to think that we need an extra method (__text__), that
> can return any kind of string that's compatible with Python's text model.
+1
While we're at it, that would be a good opportunity to add the __index__
method (for int-like objects that actually support indexing). That
would get rid of the issues with using floats as inappropriate inputs.
Can't require __index__ until 3.0, but we can start making it available.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"A foolish consistency is the hobgoblin of little minds, adored by little
statesmen and philosophers and divines." --Ralph Waldo Emerson
More information about the Python-Dev
mailing list