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#L186
I never import warcraft.listeners...
Why does this missing import NOT raise an error?
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: Why does this missing import NOT raise an error?
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?
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.
Edit: Just to be sure, I recommend nobody to start doing this just because it works.
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 101 guests