New-style string formatting (Was: Re: Tuple "detection")

Gerrit Holl gerrit at nl.linux.org
Wed May 21 05:28:08 EDT 2003


Delaney, Timothy C (Timothy) schreef op woensdag 21 mei om 01:47:16 +0000:
> > From: Gerrit Holl [mailto:gerrit at nl.linux.org]
> > 
> > Alexander Semenov schreef op maandag 19 mei om 22:57:37 +0000:
> > > I propose change % to str.__call__()
> > 
> > Sounds great! Unless we're overlooking something...
> 
> Beyond all the other objections (which I agree with BTW) you are overlooking the fact that str.__call__ already has a meaning - it creates a new string object which is composed of the string value of its arguments, usually obtained by calling the __str__ method of the argument.

That's the __call__ method of the class: every class has this method, str
is not special in that sense. But the class defines no __call__ for the
object created by the class.

yours,
Gerrit.

-- 
211. If a woman of the free class lose her child by a blow, he shall
pay five shekels in money. 
        -- Hammurabi, Code of Law
--
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
	http://www.sp.nl/





More information about the Python-list mailing list