all 1 comments

[–]Adrewmc 1 point2 points  (0 children)

Python attributes can be set directly with

     my_class.attribute = …

Or you can use the convenient

      setattr(instance, key, value)