What does ‘super’ do in Python? – difference between super().__init__() and explicit superclass __init__()

What’s the difference? SomeBaseClass.__init__(self) means to call SomeBaseClass‘s __init__. while super().__init__() means to call a bound __init__ from the parent class that follows SomeBaseClass‘s child class (the one that defines this method) in the instance’s Method Resolution Order (MRO). If the instance is a subclass of this child class, there may be a different parent … Read more

Functional programming vs Object Oriented programming [closed]

When do you choose functional programming over object oriented? When you anticipate a different kind of software evolution: Object-oriented languages are good when you have a fixed set of operations on things, and as your code evolves, you primarily add new things. This can be accomplished by adding new classes which implement existing methods, and … Read more

Monad in plain English? (For the OOP programmer with no FP background)

UPDATE: This question was the subject of an immensely long blog series, which you can read at Monads — thanks for the great question! In terms that an OOP programmer would understand (without any functional programming background), what is a monad? A monad is an “amplifier” of types that obeys certain rules and which has … Read more

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