[Tutor] What are these two string-formatting styles called?

Dotan Cohen dotancohen at gmail.com
Sun Jun 16 07:40:29 CEST 2013


On Sat, Jun 15, 2013 at 2:32 PM, Dave Angel <davea at davea.name> wrote:
>> Thank you. So would it be clear if I were to say "I prefer
>> printf-style formatting over the format method."?
>>
>
> I'd be careful there, since method is an English word as well as a Python
> one.  So I'd make it clear i was referrring to a method of a class, by
> naming the class.
>
> Something like:
>
> the format() method of the str class.
>

Actually, I specifically said 'method' in the OOP-sense of the word. I
don't see any ambiguity, as there is no other relevant class that I
know of which has a format() method. But I'm here to learn, and I
would love nothing more than for you to tell me where the sentence is
ambiguous.

Thank you! Python is both wide and deep, and this thread has been very
enlightening.

--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com


More information about the Tutor mailing list