Interpreting Left to right?

Chetan Harjani chetan.harjani at gmail.com
Fri Jun 24 00:32:33 EDT 2011


x=y="some string"
And we know that python interprets from left to right. so why it doesnt
raise a name error here saying name 'y' is not defined?

another example:
(1,2) + 3,
here, python raises a  TypeError "can only concatenate tuple(not int) to
tuple" but we know (3,) is a tuple as seen by following:
t=3,
type(t)
<type 'tuple'>
Arent both of this contradicting?

-- 
Chetan H Harjani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110624/960a69c0/attachment.html>


More information about the Python-list mailing list