This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author techtonik
Recipients techtonik
Date 2011-03-22.23:59:52
SpamBayes Score 0.012700406
Marked as misclassified No
Message-id <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za>
In-reply-to
Content
http://docs.python.org/library/2to3.html#using-2to3 contains an example.py sample which is claimed to be Python 2.x source, but that's not true:

def greet(name):
    print "Hello, {0}!".format(name)
print "What's your name?"
name = raw_input()
greet(name)

The code is valid only for Python 2.6+. For previous versions it gives the following traceback:

Traceback (most recent call last):
  File "ewe.py", line 5, in <module>
    greet(name)
  File "ewe.py", line 2, in greet
    print "Hello, {0}!".format(name)
AttributeError: 'str' object has no attribute 'format'
History
Date User Action Args
2011-03-22 23:59:56techtoniksetrecipients: + techtonik
2011-03-22 23:59:56techtoniksetmessageid: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za>
2011-03-22 23:59:52techtoniklinkissue11644 messages
2011-03-22 23:59:52techtonikcreate