Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] Object customization (was: Arbitrary attributes on funcs and methods)

Skip Montanaroskip@mojam.com (Skip Montanaro)
Fri, 14 Apr 2000 09:39:27 -0500 (CDT)


    >> Yes, of course people will use it to get the effect of function    >> statics.  OK by me.  People do the same thing today with class data    >> attributes (i.e., to    AMK> Wait, the attributes added to a function are visible inside the    AMK> function?  (I haven't looked that closely at the patch?)No, they aren't.  There is no change of Python's scoping rules using Barry'sfunction attributes patch.  In fact, they are *only* available to thefunction itself via the function's name in the module globals.  That's whyFredrik's "eff, bot = bot, eff" trick worked as it did.-- Skip Montanaro |http://www.mojam.com/skip@mojam.com |http://www.musi-cal.com/


[8]ページ先頭

©2009-2025 Movatter.jp