[ https://issues.apache.org/jira/browse/TINKERPOP-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17139940#comment-17139940 ]
Stephen Mallette commented on TINKERPOP-2386: --------------------------------------------- gremlin-python uses a trailing underscore for steps that overlap with python keywords - so {{range()}} is actually {{range_()}}. it looks like that particular step is not listed in the "Differences" section: https://tinkerpop.apache.org/docs/current/reference/#gremlin-python-differences I'll amend that. > Keyword "range" overlap with Gremlin-Python and Python3 > ------------------------------------------------------- > > Key: TINKERPOP-2386 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2386 > Project: TinkerPop > Issue Type: Bug > Components: python > Affects Versions: 3.4.7 > Environment: Environment: Ubuntu 18.04.3 LTS VM > Reporter: Justin Kellogg > Priority: Minor > Original Estimate: 24h > Remaining Estimate: 24h > > Using python's range in for loops results in a gremlin error. Example: > > {{ for x in range(0,5):}} > {{ print(x)}} > If I have gremlin-python imported, I get this error: > {{Traceback (most recent call last):}} > {{ File "clusters.py", line 133, in <module>}} > {{ Run('localhost',8182)}} > {{ File "clusters.py", line 123, in Run}} > {{ for x in range(0,5):}} > {{ File > "/home/developer/.local/lib/python3.6/site-packages/gremlin_python/process/traversal.py", > line 48, in __next__}} > {{ self.traversal_strategies.apply_strategies(self)}} > {{AttributeError: 'NoneType' object has no attribute 'apply_strategies'}} > > Python Version: 3.6.9 > -- This message was sent by Atlassian Jira (v8.3.4#803005)