Skip to content

Instantly share code, notes, and snippets.

@martinbonnin
Created October 18, 2013 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinbonnin/7041225 to your computer and use it in GitHub Desktop.
Save martinbonnin/7041225 to your computer and use it in GitHub Desktop.
class Test:
def __init__(self):
self.name = "test";
def print_name(self):
def name_cb():
print("why do I need to reference self here ?" + self.name);
return eval("self.name");
print(name_cb());
Test().print_name();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment