Why doesn't this work ? For loop variable scoping ?

Ryan Kelly ryan at rfk.id.au
Thu Mar 19 23:33:36 CET 2009

>         newCylinderTempertature = newCylinderTemperature + deltaTemp

Take a careful look at the variable name here: "Tempertature".  Python's
dynamic nature provides a lot of wonderful benefits, but you've just hit
one of the drawbacks - you don't get any protection from typos in
variable names.


Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
ryan at rfk.id.au        |  http://www.rfk.id.au/ramblings/gpg/ for details

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20090320/9f87afc5/attachment.pgp>

More information about the Python-list mailing list