Class PythonTranslateVisitor

All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeVisitor<Void>, GremlinVisitor<Void>

public class PythonTranslateVisitor extends AbstractTranslateVisitor
Converts a Gremlin traversal string into a Python source code representation of that traversal with an aim at sacrificing some formatting for the ability to compile correctly.
  • Range syntax has no direct support
  • Normalizes whitespace
  • If floats are not suffixed they will translate as BigDecimal
  • Makes anonymous traversals explicit with double underscore
  • Makes enums explicit with their proper name