[Python-ideas] One way to do format and print
dan at tombstonezero.net
Tue Sep 8 01:13:49 CEST 2015
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 it
>> 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 something
more interesting than "t"?
And why are we conflating the print function with string formatting with
natural language translation in the first place?
More information about the Python-ideas