Apr-15-2023, 10:34 PM
Given an object instantiation and invocation, can I broadly say the following?
Given the following two lines of code,
Situation 1:
I come from Java background, and you can tell a lot by variable declaration and innovation, which does not seem to be the case for Python.
Given the following two lines of code,
test = Test() test()Broadly, it could originate from one of the following two situations,
Situation 1:
class Test(): def __init__(self): # constructor pass def __call__(self): # called during object() invocation passSituation 2:
def Test(): def innerTest(): pass return innerTestAm I right? Or are there other broad categories I am missing.
I come from Java background, and you can tell a lot by variable declaration and innovation, which does not seem to be the case for Python.