You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2021/02/17 17:24:20 UTC
[tinkerpop] 02/02: Merge branch '3.4-dev'
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 1cb1d8b706b31c7fc04d99a63c1661dcbad05523
Merge: cf30afb 1c1c48a
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Wed Feb 17 12:24:04 2021 -0500
Merge branch '3.4-dev'
docs/src/reference/gremlin-variants.asciidoc | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --cc docs/src/reference/gremlin-variants.asciidoc
index a3f70fa,ee2e530..06c7306
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@@ -782,21 -752,32 +782,34 @@@ Moreover, by importing the `statics` o
With statics loaded its possible to represent the above traversal as below.
-[gremlin-python,modern]
+[source,python]
----
-g.V().hasLabel('person').has('age',gt(30)).order().by('age',desc).toList()
+>>> g.V().hasLabel('person').has('age',gt(30)).order().by('age',desc).toList()
+[v[6], v[4]]
----
- 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]
+[source,python]
----
-g.V().repeat(out()).times(2).name.fold().toList()
+>>> g.V().repeat(out()).times(2).name.fold().toList()
+[['ripple', 'lop']]
----
+ 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