0

When attempting to translate a query I wrote and tested in the Gremlin CLI to gremlin-python, I'm encountering unexpected token 'as' errors on my .as('foo') expressions. How can one use the Gremlin as keyword when using gremlin-python?

4

1 回答 1

3

When Gremlin steps conflict with Python reserved words the step gets suffixed with an underscore, so for as() you would instead do as_(). A full listing of all the steps can be found here, but currently they are:

Steps - and_(), as_(), from_(), is_(), in_(), not_(), or_(), with_()

Tokens - Scope.global_

于 2019-12-02T18:09:45.687 回答