Skip to content

Instantly share code, notes, and snippets.

@BolajiOlajide
Created February 24, 2017 16:22
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 BolajiOlajide/16e924b12db269ccd2b41963452f7089 to your computer and use it in GitHub Desktop.
Save BolajiOlajide/16e924b12db269ccd2b41963452f7089 to your computer and use it in GitHub Desktop.
Static methods
class Andela:
fellows = 'top .5 percent in Nigeria'
fellow_list = [1,2,3,4,5]
@staticmethod
def say_the_chant():
print "Andela Aww Yea!!!!"
class SecondClass:
def __init__(self):
print('asdfas')
self.andela = Andela()
def __getattr__(self, desired_attr):
return getattr(self.andela, desired_attr)
first_guy = SecondClass()
import pdb; pdb.set_trace()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment