KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What is the proper way to define a global variable that has class scope in python? Coming from a C/C++/Java background I assume that this is correct: class Shape: lolwut = None def __init__(self, default=0): self.lolwut = default; def a(self): print self.lolwut def b(self): self.a()
Tags (comma-separated)
Save Edits
Cancel