This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 1c1c48afd89b5d8aaadd4430ab5a748a3632bca7 Author: Stephen Mallette <stepm...@amazon.com> AuthorDate: Wed Feb 17 12:23:46 2021 -0500 Added some docs around importing special types in python CTR --- docs/src/reference/gremlin-variants.asciidoc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index b4b39c1..ee2e530 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -757,7 +757,7 @@ With statics loaded its possible to represent the above traversal as below. g.V().hasLabel('person').has('age',gt(30)).order().by('age',desc).toList() ---- -Finally, statics includes all the `+__+`-methods and thus, anonymous traversals like `+__.out()+` can be expressed as below. +Statics includes all the `+__+`-methods and thus, anonymous traversals like `+__.out()+` can be expressed as below. That is, without the `+__+`-prefix. [gremlin-python,modern] @@ -765,6 +765,19 @@ That is, without the `+__+`-prefix. g.V().repeat(out()).times(2).name.fold().toList() ---- +There may be situations where certain graphs may want a more exact data type than what Python will allow as a language. +To support these situations `gremlin-python` has a few special type classes that can be imported from `statics`. They +include: + +[source,python] +---- +from gremlin_python.statics import long # Java long +from gremlin_python.statics import timestamp # Java timestamp +from gremlin_python.statics import SingleByte # Java byte type +from gremlin_python.statics import SingleChar # Java char type +from gremlin_python.statics import GremlinType # Java Class +---- + anchor:python-configuration[] [[gremlin-python-configuration]] === Configuration