Python Language Basic Concepts
Published:
Last modified:
Style guide for python code PEP-8 https://www.python.org/dev/peps/pep-0008/
Relative imports makes code more portable.
- absolut import
from core.views import absolute
<— To import from outside the app - explicit relative
from .models import CommandModel
<— To import in current app
- absolut import
Avoid Using
Import *
as it can lead to undesirable results. You can’t really know which packages you are using.
comments powered by Disqus
- Understanding How Python Packages Modules And Imports WorkJanuary 2, 2017
- Python Language Basic Concepts
Articles
Except as otherwise noted, the content of this page is licensed under CC BY-NC-ND 4.0 . Terms and Policy.
Powered by SimpleIT Hugo Theme
·