-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I've found myself using make_init with arguments rather than @autoclass with parameters as it is more convenient for the cases where I need to write a customise the various dunder methods for hash, dict, eq and repr. For some cases I need init, to_dict and repr to include different fields - make_init makes this easy with the usage like:
init = make_init(height)
particularly useful when subclassing makes sense and it can include fields from the parent.
What do you think about exposing the builders for hash, dict, eq, and repr rather than having them in _apply_decorator of @autoclass?
Metadata
Metadata
Assignees
Labels
No labels