What does the slash mean in help() output?
What does the / mean in Python 3.4’s help output for range before the closing parenthesis?
What does the / mean in Python 3.4’s help output for range before the closing parenthesis?
Say I have a variable named choice it is equal to 2. How would I access the name of the variable? Something equivalent to In [53]: namestr(choice) Out[53]: 'choice' for use in making a dictionary. There’s a good way to do this and I’m just missing it. EDIT: The reason to do this is thus. … Read more
So what I’m looking for here is something like PHP’s print_r function.
Python: How to get the caller’s method name in the called method?
Given the Python function:
In Python, without using the traceback module, is there a way to determine a function’s name from within that function?
How do I find out a name of class that created an instance of an object in Python if the function I am doing this from is the base class of which the class of the instance has been derived?
Is there any way to get the name of an object in Python? For instance:
Given a Python object of any kind, is there an easy way to get the list of all methods that this object has?
Is there a straightforward way to find all the modules that are part of a python package? I’ve found this old discussion, which is not really conclusive, but I’d love to have a definite answer before I roll out my own solution based on os.listdir().