3 questions
Does Python have a function like print_r of PHP?I have to see the status of the object when I debug it.Is there a similar function?
Is there a way to find out the class name of the instance in Python?I thought I could use the inspect module, but I couldn't find it.
How do you get a function to output its own name without a traceback module?For example, when the module foo has a bar function, in foo.bar() you would like to print bar is your name bar or foo.bar.Wh...
© 2024 OneMinuteCode. All rights reserved.