4 ms·
`vars` as well: https://docs.python.org/3/library/functions.html#vars https://docs.python.org/3/library/functions.html#vars Although it'd be nice if it worked
by masklinn 3y ago
`vars` as well: https://docs.python.org/3/library/functions.html#vars https://docs.python.org/3/library/functions.html#vars
Although it'd be nice if it worked with slotted classes instead of just blowing up.
Dataclasses have asdict which work on both, but it's annoying there's nothing for regular classes.