I'm a noob and not sure what this part means #316
-
Hi there, Thankyou Edit: I believe I have seen the answer to this by looking at the folder structure more. It appears to me that using " from . import ... " is simply saying, " from the same folder import ... " |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You don't need to import our models or http stack at all, all of this is handled for you via the Client/Bot and the respected objects. |
Beta Was this translation helpful? Give feedback.
-
Further reading: https://blog.finxter.com/python-dot-relative-import/ (do ignore the random "cheat sheet" popup on the site) |
Beta Was this translation helpful? Give feedback.
from . import X
is something used in packagesYou can make packages in your code by simply making a subfolder and putting files in it.
When you see such code, it's basically the same as
from <thismodule> import X
Further reading: https://blog.finxter.com/python-dot-relative-import/ (do ignore the random "cheat sheet" popup on the site)