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

Implicit Relative Import vs Absolute Import #147

Open
anwarabq opened this issue May 30, 2019 · 1 comment
Open

Implicit Relative Import vs Absolute Import #147

anwarabq opened this issue May 30, 2019 · 1 comment

Comments

@anwarabq
Copy link

Location within the Book

  • Chapter 1: Coding Style
  • 1.4 Use Explicit Relative Imports

Description

On page 5 in example 1.2 there's an example of implicit relative import:

from core.views import FoodMixin

On the next page in table 1.1 the same import statement is used but as an example of absolute import.

This is very confusing. Is the type of import defined based on both the syntax and on the context whether it's called outside or inside the current app?

@lcmartinezdev
Copy link

Hello @pydanny have you seen this issue?
I have the same question, so I really appreciate an aswer.

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

No branches or pull requests

2 participants