Reputation: 7768
I cannot figure out what this import does and how to use it in the python code. I am new to python.
import datasources.google as google
Upvotes: 0
Views: 78
Reputation: 12705
This line of code imports the module datasources.google
. When you import a whole module with import whatevermodule
, you have to include it every time you use a thing from that module, like so:
datasources.google.dowhatever(thing)
Since datasources.google
is really long, it would be nice to have a short way of writing it. That's what the as google
part does. It means you can instead write:
google.dowhatever(thing)
and saves you a bunch of typing.
Upvotes: 2