Why does this missing import NOT raise an error?
Posted: Tue Sep 27, 2016 2:38 pm
by Mahi
It seems like I've forgotten an import, but for one reason or another the code runs just fine and no errors are raised:
https://github.com/Mahi/Warcraft-SP/blo ... ft.py#L186I never import warcraft.listeners...
Re: Why does this missing import NOT raise an error?
Posted: Tue Sep 27, 2016 3:42 pm
by L'In20Cible
I assume that you import
warcraft.heroes which import
warcraft.entities which import
warcraft.entities.hero which import
warcraft.listeners bounding it to the warcraft module.
Re: Why does this missing import NOT raise an error?
Posted: Tue Sep 27, 2016 3:59 pm
by Mahi
Ohhh, that's exactly it! I didn't know that it's enough for one file to import it like that if it's all in the same package. TIL, thanks :)
Edit: Just to be sure, I recommend nobody to start doing this just because it works.