Anand B Pillai <anandpil...@letterboxes.org> wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >On Tuesday 10 September 2013 10:57 AM, Shabda Raaj wrote: >>> A variable is either local or global. It is decided at the >>> compile time. >> >> Erm, compile? >> >> >> Python's scoping rules are , erm, interesting: >> >> http://me.veekun.com/blog/2011/04/24/gotcha-python-scoping-closures/ > >Another >> >one. Ability to modify builtin booleans. > > >>>> True,False=False,True True >False >>>> False >True >>>> if False: print 'OK' >.. >OK >
Just adding, it won't work in Python 3.x. >> >> The mnemonic for scoping is LEGB: >> >http://stackoverflow.com/questions/291978/short-description-of-python-scoping-rules >> >> >_______________________________________________ >> BangPypers mailing list BangPypers@python.org >> https://mail.python.org/mailman/listinfo/bangpypers >> > > >- -- >Regards, > >- --Anand > >- >-------------------------------------------------------------------------------------- >Software Architect/Consultant >anandpil...@letterboxes.org > >Please note my updated email address <anandpil...@letterboxes.org>. >Kindly update your address books. > >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.4.11 (GNU/Linux) >Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > >iQEcBAEBAgAGBQJSLrd7AAoJEMTxYeOp9eaoA1cIAK1dVtOXXyJICUsaFAiQA6CW >2w4OhQtbhvBvQcO2k39tt5vx8NXmipRmsBHTALKE7LOu/Vdo7Vj3RlkrQTtmJybM >i/q4uOLPu8Ubaba2Du4OTmYqSZkxQh/7lNN3pc4aoixygCppgetQbQ/7i5gUeNYK >x99RrtYzOn0P+p2JNhGuYZmMAFxkFAkqU9ajfu+0vaOI5ZpbfjqCLUTqZd7rTlfI >36Y451LyeCO+R3D14IIF9G/mRcUOAOPVrh0wcTIuTUtGdgGp8Z2Y8VvDin2n8lZ4 >2JMDflfyZziUPFjcqQJCQrGA4I7CbYtHWT4daydn3o7icM9JtFqLAqDJfDnG5ew= >=aVB/ >-----END PGP SIGNATURE----- >_______________________________________________ >BangPypers mailing list >BangPypers@python.org >https://mail.python.org/mailman/listinfo/bangpypers -- Thanks Bibhas http://bibhas.in Sent from my Android device with K-9 Mail. Please excuse my brevity. _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers