Pre-PEP: Refusing to guess in string formatting operations

Jp Calderone exarkun at intarweb.us
Wed Mar 12 12:08:57 EST 2003


On Wed, Mar 12, 2003 at 02:58:40PM +0000, Michael Hudson wrote:
> 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.

  Well, that's a pleasant surprise.  I guess a PEP wasn't needed after all.

  Thanks for the pointer,

  Jp

-- 
 up 9 days, 9:59, 9 users, load average: 0.44, 0.18, 0.06





More information about the Python-list mailing list