Do you find it annoying to write an __init__ method every time you want to create a class in Python? If so, try attrs.
attrs allows you to:
- declaratively define the attributes of a class
- get a nice human-readable __repr__ without extra code
- turn attributes of an instance into a dictionary
Find other benefits of using attrs here.
2 thoughts on “attrs: Bring Back the Joy of Writing Classes”
Good initiative Khuyen, keep it up.
Thank you, Tej!
Comments are closed.