[Tutor] print in py3
Keith Winston
keithwins at gmail.com
Sun Dec 22 06:43:46 CET 2013
I've been playing with afterhoursprogramming python tutorial, and I was
going to write a question about
myExample = {'someItem': 2, 'otherItem': 20}
for a in myExample:
print (a, myExample[a])
print (a)
returning
('someItem', 2)
someItem
('otherItem', 20)
otherItem
Which is to say, why would the output formatting be completely different
(parens, quotes) between the two print statements, but then when I run it
in Python 3.3, it's the more reasonable
otherItem 20
otherItem
someItem 2
someItem
Which I'm much happier with. I assume this just reflects changes in the
print command default formatting: is there some reasonably efficient way to
see where/when/how this changed? I guess it would be buried in a PEP
somewhere?
--
Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131222/62dd2adc/attachment.html>
More information about the Tutor
mailing list