Set Dynamic Attribute


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. C.__dict__['classattr'] = value

URL: http://www.cafepy.com/article/python_attributes_and_methods/python_attributes_and_methods.html#the-dynamic-dict

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.