(Dec-23-2019, 04:55 PM)Denni Wrote: Okay @buran first off importing PyQt import QtWidgets does not import the same thing as from PyQt.QtWidgets import QApplication, etc... because in the latter you have a single reference to a single method and this denotes exactly what you are using within that library within your program. And again not being specific is being lazy and lazy coding is always bad coding.Unless PyQt is doing some weird stuff (which I doubt), it imports the whole PyQt.QtWidgets. As I said the difference is what references are available after that in the namespace.
Regarding the
super()
- it's "mandatory" in case of multiple inheritance. And in case of single inheritance you can do just super().__init__(*args, **kwargs)
, i.e. it's not required to pass explicit reference inside super()
. In any case your statement that using super()
is wrong is misleading and incorrect. And in the example *args, **kwargs
is just that - example.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs