Pre-PEP: Refusing to guess in string formatting operations

Michael Hudson mwh at python.net
Wed Mar 12 09:58:40 EST 2003


Jp Calderone <exarkun at intarweb.us> writes:

>   In retrospect, I would rather have the method named __mod__.  It is the
> only thing that -really- makes sense, and it clears up two related warts:
> using the % operator on strings calls no function reachable from Python, and
> subclasses of str cannot override the % behavior.

This is fixed in 2.3, I'm fairly sure.

Cheers,
M.

-- 
  It's an especially annoying American buzzword for "business use, 
  as opposed to consumer, research, or educational use".
                                    -- Tim Peters defines "enterprise"




More information about the Python-list mailing list