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
Post a Comment