- 433 名前:デフォルトの名無しさん mailto:sage [04/02/08 22:56]
- >>426
421-422 じゃないけど、Python 学習をかねて調べてみました。 class Foo: def f(self): return "I'm of class" foo = Foo() foo.f() => "I'm of class" bar = Foo() bar.f() => "I'm of class" def newF(): return "I'm *not" of class" foo.f = newF foo.f() => "I'm *not* of class" bar.f() => "I'm of class" def anotherF(self): return "I'm *also* of class" Foo.f = antoherF foo.f() => "I'm *not* of class" bar.f() => "I'm *also* of class"
|

|