What does "from gremlin_python.process.graph_traversal import __" do in Python?

Viewed 278

I am currently working on getting started with Janus Graph and Gremlin-Python. I am going through the following example:

https://old-docs.janusgraph.org/latest/connecting-via-python.html

In part 2 of the example, there is some strange syntax I have never seen in Python before:

from gremlin_python.process.graph_traversal import __

I understand how imports work and the from as well as import... but what on earth is import ___??

My guess would be that it imports private functions... but I don't see any private functions in use in the example. So what is this doing?

1 Answers

The identifier __ has no special meaning in Python, aside from not being imported by default when using from module import * like all identifiers of the form _*. See the Python documentation on Reserved Identifiers.

Related