Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
もしそうなら、あなたはこれをどのように行いますか?
def methodname(self、blah、blah)^この中に関数を配置するにはどうすればよいですか。
はい、あなたはただdef内側に固執します。クラス全体を関数やメソッド内にネストすることもできます。
def
class Foo(object): def method(self, bar): def inner(magic): class Madness(object): def __init__(inself, foo): inself.foo = foo return Madness(magic) return inner(bar)