Skip to content

Instantly share code, notes, and snippets.

@gknoy gknoy/

Created Aug 25, 2016
What would you like to do?
Demo renaming `attr` library helpers to less-clever names
# demo_attrs
import attr
class Foo(object):
x = attr.ib()
y = attr.ib()
from attr import (
s as AttributedModel,
ib as attribute,
class Bar(object):
x = attribute()
y = attribute()
def main():
foo = Foo(x=1, y=2)
bar = Bar(x=1, y=2)
print('foo', foo)
print('bar', bar)
if __name__ == '__main__':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.