Sujet : Re: python3 package import difference?
De : rosuav (at) *nospam* gmail.com (Chris Angelico)
Groupes : comp.lang.pythonDate : 08. Aug 2024, 00:43:54
Autres entêtes
Message-ID : <mailman.32.1723070648.2890.python-list@python.org>
References : 1 2
On Thu, 8 Aug 2024 at 03:40, Tobiah via Python-list
<
python-list@python.org> wrote:
The one under rcs.dbi contains:
>
from dbi import *
from regos import *
>
You probably want these to be package-relative now:
from .dbi import *
from .regos import *
Or, since you're using namespaced imports anyway ("rcs.dbi.feature"),
you may prefer this form:
from . import dbi, regos
ChrisA