[Python-ideas] One way to do format and print
rymg19 at gmail.com
Tue Sep 8 01:25:52 CEST 2015
On September 7, 2015 6:13:49 PM CDT, Dan Sommers <dan at tombstonezero.net> wrote:
>On Mon, 07 Sep 2015 17:39:26 -0500, Ryan Gonzalez wrote:
>> On September 7, 2015 3:52:52 PM CDT, Random832
><random832 at fastmail.com> wrote:
>>> I've never understood why .format was invented in the first place,
>>> rather than extending percent-formatting to have the features that
>>> has over it.
>> t = (1, 2, 3)
>> # 400 lines later...
>> print '%s' % t # oops!
>t = (1, 2, 3)
># 400 lines later
>t *= 4 # oops?
>Why do you (Ryan Gonzalez) have names that are important enough to span
>over 400 lines of source code but not important enough to call
>more interesting than "t"?
>And why are we conflating the print function with string formatting
>natural language translation in the first place?
You're blowing this out of proportion. I was simply showing how string formatting can be *weird* when it comes to tuples.
>Python-ideas mailing list
>Python-ideas at python.org
>Code of Conduct: http://python.org/psf/codeofconduct/
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.
More information about the Python-ideas