Py3.3 unicode literal and input()
d at davea.name
Mon Jun 18 19:03:57 CEST 2012
On 06/18/2012 12:55 PM, Andrew Berg wrote:
> On 6/18/2012 11:32 AM, Jussi Piitulainen wrote:
>> jmfauth writes:
>>> Thinks are very clear to me. I wrote enough interactive
>>> interpreters with all available toolkits for Windows
>>>>> r = input()
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> SyntaxError: u'a
>> Er, no, not really :-)
> You're using 2.x; this thread concerns 3.3, which, as has been repeated
> several times, does not evaluate strings passed via input() like 2.x.
> That code does not raise a SyntaxError in 3.x.
And you're missing the context. jmfauth thinks we should re-introduce
the input/raw-input distinction so he could parse literal strings. So
Jussi demonstrated that the 2.x input did NOT satisfy fmfauth's dreams.
More information about the Python-list