- 13 名前:デフォルトの名無しさん mailto:sage [2014/01/02(木) 17:48:14.14 ]
- それじゃあ質問
今居る関数の、関数オブジェクトを表している特殊変数ありませんか? 下記のような時 __self__ みたいな特殊変数があると this = hoge_hoge_fuga_fuga しなくて済むのだけど def hoge_hoge_fuga_fuga(): this = hoge_hoge_fuga_fuga if 'x' not in this.__dict__: this.__dict__['x'] = 100 this.x += 1 print(this.x) hoge_hoge_fuga_fuga() hoge_hoge_fuga_fuga()
|

|