Is it possible to use two Python packages with the same name?

前端 未结 4 1077
迷失自我
迷失自我 2020-12-11 02:38

I have a question about imports. The question might seem a bit contrived, but its purpose is to explore the limitations of using absolute imports for all imports in a packa

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-11 03:08

    No, but you can use keyword "as" and rename the package name as you wish. EG:

    from tableaudocumentapi import Workbook as table
    

提交回复
热议问题