Pylint warning for “useless super delegation”

If you call the SpecificError class it will look for an __init__. If it doesn’t exist it will call the parent’s __init__. There is no need to add an __init__ here, since it’s exactly the same like the parent class. It is basically code duplication. You should do: class SpecificError(MyProjectExceptions): “””Raise when a specific error … Read more

Why do we have to use the __dunder__ methods instead of operators when calling via super?

CPython’s bug tracker’s issue 805304, “super instances don’t support item assignment”, has Raymond Hettinger give a detailed explanation of perceived difficulties. The reason this doesn’t work automatically is that such methods have to be defined on the class due to Python’s caching of methods, whilst the proxied methods are found at runtime. He offers a … Read more

what does super() do without any arguments?

In ES6, derived classes have to call super() if they have a constructor. In react, all components extend from the Component class. You don’t actually need a constructor for every ES6/react class. If no custom constructor is defined, it will use the default constructor. For base classes, it is: constructor() {} And for derived classes, … Read more

What’s the difference between super() and Parent class name?

Not in this case. But in general, and especially when you use multiple inheritance, super() delegates to the next object in the Method Resolution Order (MRO) as is specified in the documentation: super([type[, object-or-type]]) Return a proxy object that delegates method calls to a parent or sibling class of type. This is useful for accessing … Read more

Python super() behavior not dependable

Are you reloading modules somehow in the middle of things? If so, that may explain this error. isinstance(self,DBAdminConnection) may become false after reloading modules because of the changes to memory references, apparently. Edit: if you’re running your web.py app under mod_wsgi, make sure you’re disabling autoreload: app = web.application(urls, globals(), autoreload=False)

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