Thomas Fischbacher <[email protected]> added the comment:
The current behavior deviates from the documentation in a way that might evade
tests and hence has the potential to cause production outages.
Is there a way to fix the documentation so that it correctly describes current
behavior - without having to wait for a new release? Eliminating the risk in
such a way would be highly appreciated.
In the longer run, there may be some value in having a differently named method
(perhaps .as_dict()?) that basically returns
{k: v for k, v in self.__dict__.items()}, but without going through reflection?
The current approach to recurse looks as if it were based on quite a few
doubtful assumptions.
(Context: some style guides, such as Google's Python style guide,
limit the use of reflection in order to keep some overall undesirable processes
in check: https://google.github.io/styleguide/pyguide.html#2191-definition)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45135>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com