Movatterモバイル変換
[0]ホーム
[Python-Dev] Object customization (was: Arbitrary attributes on funcs and methods)
Andrew M. Kuchlingakuchlin@mems-exchange.org
Fri, 14 Apr 2000 10:15:37 -0400 (EDT)
>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., toWait, the attributes added to a function are visible inside thefunction? (I haven't looked that closely at the patch?) That strikesme as a much more significant change to Python's scoping, making itlocal, function attribute, then global scope. a I thought of theattributes as labels that could be attached to a callable object forthe convenience of some external system, but the function would remainblissfully unaware of the external meaning attached to itself. -1from me if a function's attributes are visible to code inside thefunction; +0 if they're not.-- A.M. Kuchlinghttp://starship.python.net/crew/amk/The paradox of money is that when you have lots of it you can manage lifequite cheaply. Nothing so economical as being rich. -- Robertson Davies, _The Rebel Angels_
[8]ページ先頭