Skip to content

Instantly share code, notes, and snippets.

@dpnova
Created January 4, 2016 04:43
Show Gist options
  • Save dpnova/9c837b443392573c6807 to your computer and use it in GitHub Desktop.
Save dpnova/9c837b443392573c6807 to your computer and use it in GitHub Desktop.
>>> class Bar:
... def __init__(self):
... print "bar init"
...
>>> @attr.s
... class Foo(Bar, object):
... something = attr.ib()
...
>>> Foo("something")
Foo(something='something')
>>>
@dpnova
Copy link
Author

dpnova commented Jan 4, 2016

>>> class NewBar(object):
...  def __init__(self):
...   print "in newbar"
... 
>>> @attr.s
... class NewFoo(NewBar):
...  something = attr.ib()
... 
>>> NewFoo("something")
NewFoo(something='something')
>>> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment