Movatterモバイル変換
[0]ホーム
[Python-Dev] Object customization (was: Arbitrary attributes on funcs and methods)
Tim Peterstim_one@email.msn.com
Thu, 13 Apr 2000 22:32:48 -0400
[Gordon McMillan]> ...> Or are you saying that if functions have attributes, people will> all of a sudden expect that function locals will have initialized> and maintained state?I expect that they'll expect exactly what happens in JavaScript, whichsupports function attributes too, and where it's often used as anicer-than-globals way to get the effect of C-like mutable statics(conceptually) local to the function.BTW, viewing this all in OO terms would make compelling sense only if Guidoviewed everything in OO terms -- but he doesn't. To the extent that peoplemust <wink>, Python doesn't stop you from adding arbitrary unique attrs toclass instances today either.consistent-in-inconsistency-ly y'rs - tim
[8]ページ先頭