Skip to content

0.6.0 - default factories and slots

Compare
Choose a tag to compare
@smarie smarie released this 04 Oct 16:37
· 190 commits to main since this release

default value factories

  • default_factory callables now receive one argument: the object instance. Fixes #6
  • New decorator @<field>.default_factory to define a default value factory. Fixed #27
  • New copy_value, copy_field and copy_attr helper functions to create default value factories. Fixed #26

support for slots

  • field now automatically detects when a native field is attached to a class with slots and no __dict__ is present. In that case, the native field is replaced with a descriptor field. Fixed #20.

See documentation page for details.