How to overwrite a imported python class for all calls

后端 未结 2 528
没有蜡笔的小新
没有蜡笔的小新 2021-02-04 08:29

I create a python-packages /MyLibPackage which I will import in my projects.

MyLibPackage.____init____.py includes mymodiciation.py. Furthermore the MyLibPa

2条回答
  •  余生分开走
    2021-02-04 08:53

    Having classes with the same name is generally a bad idea as you get namespace clashes. I would recommend changing your MyLibPackage.base_classes.Bookcollection to MyLibPackage.base_classes.BaseBookcollection or similar. This should then work as expected.

提交回复
热议问题