Python 3.5 vs Python 2.7: Modules importing submodules

后端 未结 1 1459
闹比i
闹比i 2021-01-12 13:39

I have been googling this for the past hours and can\'t find an equivalent question anywhere. Also the documentation for 2.7 and 3.5 seem identical, so I don\'t think this b

1条回答
  •  礼貌的吻别
    2021-01-12 14:25

    Use an explicit relative import:

    from . import subapi
    

    0 讨论(0)
提交回复
热议问题