from ./.. import
Jon Ribbens
jon+usenet at unequivocal.eu
Fri Oct 4 09:15:15 EDT 2019
On 2019-10-04, Hongyi Zhao <hongyi.zhao at gmail.com> wrote:
> See this file:
> https://github.com/hongyi-zhao/dotbot/blob/master/dotbot/messenger/
> messenger.py
>
> It has the following codes:
>
> from ..util.singleton import Singleton
> from ..util.compat import with_metaclass
> from .color import Color
> from .level import Level
>
> I just cannot figure out why they using the ``from ./.. import'' to
> import modules.
Why wouldn't they be? That's how you import things from the
current/parent package.
More information about the Python-list
mailing list