[Python-Dev] Re: Type-converting functions, esp. unicode() vs. unistr()

Ka-Ping Yee ping@lfw.org
2001年1月18日 02:16:42 -0800 (PST)


On 2001年1月18日, Ka-Ping Yee wrote:
> str() looks for __str__

Oops. I forgot that
 str() looks for __str__, then tries __repr__
So, presumably,
 unicode() should look for __unicode__, then __str__, then __repr__
-- ?!ng

AltStyle によって変換されたページ (->オリジナル) /