Last active
August 29, 2015 14:01
-
-
Save andrewgodwin/f192a20e3b4cf0f5b5d8 to your computer and use it in GitHub Desktop.
Function Membership Introspection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass(object): | |
def a(self): | |
pass | |
b = [a] | |
# Get the reference to a from the list | |
a = MyClass.b[0] | |
# How do I get the class a was defined on? Is it even possible? | |
# On Python 3, I can use __qualname__. This isn't around on Python 2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@alexsv I've tried getting the code and the only thing you get is