Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

absolute import #290

Merged
merged 1 commit into from
May 13, 2017
Merged

absolute import #290

merged 1 commit into from
May 13, 2017

Conversation

likang
Copy link
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

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