Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 21
    oh, before reading your answer, I thought calling a function explicitly from its location is a good practice.
    – aerin
    Commented Feb 26, 2018 at 1:30
  • 11
    @Aerin it would be better do not consider short statements (or, in this case, subjective conclusions) to be always true. Importing from __init__.py may be useful sometimes, but not all times. Commented Dec 11, 2019 at 21:33
  • 2
    what has to be inside init.py?
    – pm1359
    Commented May 18, 2021 at 17:38
  • 1
    from something import * is always a bad idea. I prefer to use import something then use something.someaction to call the specific someaction. In this way, you know exactly 'someaction' is from 'something' package. Avoid messing the namespace.
    – Ben L
    Commented Nov 7, 2022 at 19:48