Published 3 months ago
With vars(object)
, you can return a dictionary that maps an object's attribute names to their values. Handy for implementing __str__
methods.
With vars(object)
, you can return a dictionary that maps an object's attribute names to their values. Handy for implementing __str__
methods.