Tuesday, 23 January 2024

python covert obj to dict

 https://stackoverflow.com/questions/61517/python-dictionary-from-an-objects-fields


instead of x.__dict__, it's actually more pythonic to use vars(x).

No comments:

Post a Comment