per page, with , order by , clip by
Results of 1 - 1 of about 1 for ismethod (0.002 sec.)
inspect --- 活動中のオブジェクトを調査する 9414
inspect --- 活動中のオブジェクトを調査する ソースコード: Lib/inspect.py inspect モジュールは、モジュール、クラス、メソッド、関数、トレースバック、フレームオブジェクト、コードオブジェクトなど、実行中のオブジェクトの情報を取得する便利な関数を ... したクラスの場合に True を返します。 list[int] など、クラスの ジェネリックエイリアス に対しては False を返します。 inspect. ismethod ( object ) オブジェクトが Python で書かれた束縛メソッドの場合、 True を返します。 注釈 例えば、次のクラスを考えます。 >>> ... 。 >>> instance = Greeter () >>> instance . say_hello <bound method Greeter.say_hello of <__main__.Greeter object ...>> >>> ismethod ( instance . say_hello ) True >>> isfunction ( instance . say_hello ) False Greeter クラスを通じて say_hello にアクセスする ... と、関数自体が返されます。 この関数に対しては、 ismethod() は False を返しますが、 isfunction() は True を返します。 >>> Greeter . say_hello <function Greeter.say_hello at 0x7f750 ...
https://man.mtool.work/python/3.14/library/inspect.html
PREV 1 NEXT