Python: ‘super’ object has no attribute ‘attribute_name’

After the base class’s __init__ ran, the derived object has the attributes set there (e.g. some_var) as it’s the very same object as the self in the derived class’ __init__. You can and should just use self.some_var everywhere. super is for accessing stuff from base classes, but instance variables are (as the name says) part of an instance, not part of that instance’s class.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)