[Tutor] Misc question about scoping

Tino Dai oberoc at gmail.com
Thu Jun 3 17:50:42 CEST 2010


Hi All,

    Is there a way to express this:
    isThumbnail = False
    if size == "thumbnail":
        isThumbnail = True

     like this:
     [ isThumbnail = True if size == "thumbnail" isThumbnail = False ]
     and the scoping extending to one level above without resorting to the
global keyword?

Thanks,
Tino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100603/cf50146f/attachment.html>


More information about the Tutor mailing list