Skip to content

absolute import#290

Merged
tusharmakkar08 merged 1 commit intoalecthomas:masterfrom
likang:master
May 13, 2017
Merged

absolute import#290
tusharmakkar08 merged 1 commit intoalecthomas:masterfrom
likang:master

Conversation

@likang
Copy link
Copy Markdown
Contributor

@likang likang commented May 13, 2017

It is very likely to get package conflict when using relative import like 'from error import *' in python3, so I think it's time to use absolute import 😄

here is an example:
.
├── __init__.py
├── error.py
└── my_app.py (only one line in this file import voluptuous)

then if you run python3 my_app.py will get an error:

AttributeError: module 'error' has no attribute 'Invalid'

@coveralls
Copy link
Copy Markdown

coveralls commented May 13, 2017

Coverage Status

Coverage decreased (-0.08%) to 95.309% when pulling 33fc381 on likang:master into f24fc02 on alecthomas:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants