Movatterモバイル変換


[0]ホーム

URL:


Call a function using a variable

Andrew Dalkedalke at acm.org
Fri Apr 27 17:15:57 EDT 2001


Colin Meeks asked:>Does anybody know if it's possible to do something along the followinglines>:>>myfunction="test">x=myfunction>>> def test(): print "Testing!"...>>> myfunction = globals()["test"]>>> myfunction()Testing!>>>                    Andrewdalke at acm.org


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp