Does Python need to know the definition of passed, but unused object? -


a, b, c , x classes in different modules. want pass object of class x following way: a->b->c

is necessary inculde class x in b, or can pass class x object without knowing definition? (i don't need use methods or anything, return object)

no, not.

about time have from some_module import some_object when going create instances of some_object, or want catch exceptions some_module. if have instances of some_object being passed in use (read, write, or call various attributes, etc.).


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -