This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Paragape
Recipients Paragape
Date 2017-05-31.02:54:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496199251.51.0.430123628937.issue30518@psf.upfronthosting.co.za>
In-reply-to
Content
I have a 'base' module where I define some type aliases, such as:

    from typing import List, Tuple
    Block = [int, Tuple[int]]
    Blocks = List[Block]
    Tags = List[str]

I would like to import these aliases into other modules so that the 'base' module provides the definitive alias.

Currently, if I attempt to import the type aliases using:

    from base_module import Tags, Blocks

Pycharm shows no error, but when I attempt to execute the code I get the error:

    ImportError: cannot import name 'Tags'

I see that there has been some discussion related to this in 2015, but I can't find any documentation saying that something like this has been implemented.
History
Date User Action Args
2017-05-31 02:54:11Paragapesetrecipients: + Paragape
2017-05-31 02:54:11Paragapesetmessageid: <1496199251.51.0.430123628937.issue30518@psf.upfronthosting.co.za>
2017-05-31 02:54:11Paragapelinkissue30518 messages
2017-05-31 02:54:11Paragapecreate