Inheriting from a class defined in an imported module in Python -


i have 2 python classes in 2 separate modules. modules reference each other, must use import xxx syntax rather from xxx import yyy. can't figure out how access class defiend in 1 module in other, importing module though:

### testa.py  import testb  class testa():   ...  ### testb.py  import testa  class testb(testa.testa):  # doesn't work   ... 

how do this?

you can solve putting import testb after definition of testa. however, might need rethink module structure since circular imports difficult deal with.


Comments

Popular posts from this blog

python 3.x - Mapping specific letters onto a list of words -

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -