@200_success 'import operator' mean their would be a reference variable 'operator' that points to object of class 'module' and that object has all the methods and atrributes of that module as part of that Object members, correct?
This query is in continuation with link to understand further on this point:
In the case of functions, you have an object which has certain fields,
which contain e. g. the code in terms of bytecode, the number of
parameters it has, etc.
My question:
1) How do i visualise a function be...
in java to avoid switch case to call shark/fish/empty's update() i used polymorphism byt creating a parent class Critter and then called update() in single line
so i need to maintain a ocean of 2d array cells of no type and store each cell shark/fish/empty class, and then access each cell just like that, update() method will be called automatically. so the problem came in java i decalred type of oceanMatrix as Critter at compile time private Critter[][] oceanMatrix;
becasue* i declared
so i need to use poly to call corresponding update() method
so no need of inheritance in python? becasue i dont requrie parent class critter in python in this case?