I'm java programmer trying to learn Python and as a result I'm trying to relate both the languages.
Recently I started working with PyQt5 library. I'm following a tutorial on udemy where we used
custom_signal = pyqtSignal(str)
then in our slot the data comes in as string. If we use
custom_signal = pyqtSignal(int)
then data will be passed as an integer to slot.
Could anyone explain me what's happening internally. Why we are passing datatype name to constructor of a class (pyqtSignal(int)). Is it related to something like Generic types in java?
List<Integer> list = new ArrayList<Integer>();
As the above variable only accepts integers, pyqtSignal(int) also is similar to that?
Could someone throw some light on that. This may be silly, but I just wanted to understand whats happening inside. I tried to watch the source code of pyqtSignal class but I was not able to find the same online anywhere.
Also could anyone please tell me object creation process that happens internally like what special methods (_new_, _init_ etc..) are called and in what sequence for what purpose.
Thanks in advance