[
https://issues.apache.org/jira/browse/TINKERPOP-2315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17211958#comment-17211958
]
Cyril Scetbon commented on TINKERPOP-2315:
------------------------------------------
It seems to relate to the other debug issue. the fact that I check
graph_traversal probably executes it or add what Gremlin believes to be a step
(*values* is called as you can see) somehow, so I can't clone it anymore.
{noformat}
In [250]: tr = g.V().limit(1)
In [251]: tr.clone().next()
Out[251]: v[8354]
In [252]: tr.clone().next()
Out[252]: v[8354]
In [253]: tr.clone().next()
Out[253]: v[8354]
In [254]: tr
Out[254]: [['V'], ['limit', 1], ['values',
'_ipython_canary_method_should_not_exist_']]
In [255]: tr.clone().next()
---------------------------------------------------------------------------
StopIteration Traceback (most recent call last)
<ipython-input-255-96318c989e83> in <module>
----> 1
tr.clone().next()~/.virtualenvs/dataloader/lib/python3.7/site-packages/gremlin_python/process/traversal.py
in next(self, amount)
87 def next(self, amount=None):
88 if amount is None:
---> 89 return self.__next__()
90 else:
91 count =
0~/.virtualenvs/dataloader/lib/python3.7/site-packages/gremlin_python/process/traversal.py
in __next__(self)
48 self.traversal_strategies.apply_strategies(self)
49 if self.last_traverser is None:
---> 50 self.last_traverser = next(self.traversers)
51 object = self.last_traverser.object
52 self.last_traverser.bulk = self.last_traverser.bulk -
1StopIteration:{noformat}
> Implement some form of clone() or reset() for Traversal in GLVs
> ---------------------------------------------------------------
>
> Key: TINKERPOP-2315
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2315
> Project: TinkerPop
> Issue Type: Improvement
> Components: dotnet, javascript, python
> Affects Versions: 3.3.9
> Reporter: Stephen Mallette
> Assignee: Stephen Mallette
> Priority: Major
> Fix For: 3.5.0, 3.4.5, 3.3.10
>
>
> There doesn't seem to be a method to do what we do in Java fairly often:
> {code}
> attached = g.V().hasLabel('OID').out('attached')
> assert attached.clone().count().next() == 4
> uids = attached.clone().dedup().toList()
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)