精華區beta Python 關於我們 聯絡資訊
※ 引述《theodolite (無)》之銘言: : ※ 引述《[email protected] (月兌)》之銘言: : : foo(bar) : 應該是就是我要的了,那再請問class method是否也是比照辦理呢? : Java中是reflection,Python是Introspection : 正在嘗試中…Python的學習曲線還蠻平順的:) >>> class C : ... def foo(self) : print "foo" >>> c = C() >>> getattr(c, "foo")() foo -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.88.219