You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the idea came from implementing pydantic's benchmark today (by the way, early results show that cythonized version of pyfields is better than pydantic and non-cythonized is equivalent).
It ended up being quite heavy to implement the model's benchmark:
the main is that in python 3.6+, it is possible to create a new decorator @autofields, that one would use to say "every member in this class that is not a function is a field and its value if provided is its default value"
also there could maybe be a way to automatically add converters from dict to classes decorated with @autofields (calling <type>(**dct))
The text was updated successfully, but these errors were encountered:
the idea came from implementing pydantic's benchmark today (by the way, early results show that cythonized version of pyfields is better than pydantic and non-cythonized is equivalent).
It ended up being quite heavy to implement the model's benchmark:
This could be simplified by a few things:
the main is that in python 3.6+, it is possible to create a new decorator
@autofields
, that one would use to say "every member in this class that is not a function is a field and its value if provided is its default value"also there could maybe be a way to automatically add converters from dict to classes decorated with
@autofields
(calling<type>(**dct)
)The text was updated successfully, but these errors were encountered: