Pages

Monday, February 15, 2021

How to get a function name as a string in python?

 In Python, how do I get a function name as a string, without calling the function?

def my_function():
    pass

print get_function_name_as_string(my_function) # my_function is not in quotes
should output "my_function".

1 comment:

  1. Merkur Gold Strike Safety Razor - FEBCASINO
    Merkur's Gold 토토 Strike https://febcasino.com/review/merit-casino/ Safety Razor, Merkur Platinum Edge Plated Finish, German, Gold-Plated, 1xbet app Satin Chrome 바카라 사이트 Finish. Merkur has a worrione.com more aggressive looking,

    ReplyDelete