[
https://issues.apache.org/jira/browse/TINKERPOP-2199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16831230#comment-16831230
]
ASF GitHub Bot commented on TINKERPOP-2199:
-------------------------------------------
spmallette commented on pull request #1106: TINKERPOP-2199 Fixed
P.within()/without() behavior in gremlin-python
URL: https://github.com/apache/tinkerpop/pull/1106
https://issues.apache.org/jira/browse/TINKERPOP-2199
Made behavior for varags usage consistent with what Java does. Was never
really sure what to do with this, but after reviewing the Java implementation
it prefers a Collection as a single argument and basically converts the varargs
to Collection, so basically just doing the same thing here.
builds with `mvn clean install`
VOTE +1
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> within step does not work with more than two parameters with python
> -------------------------------------------------------------------
>
> Key: TINKERPOP-2199
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2199
> Project: TinkerPop
> Issue Type: Bug
> Components: python
> Affects Versions: 3.4.1
> Environment: Linux
> Reporter: Nicolas Gruel
> Priority: Minor
>
> When there are more than two elements in 'within', the query return an
> TypeError. The same query is working as expected with gremlin console:
>
> > g.E().hasLabel(within('nephew', 'uncle', 'cousin')).drop().toList()
>
> Gave the error:
> {color:#e75c58}---------------------------------------------------------------------------{color}
> {color:#e75c58}TypeError{color} Traceback (most recent call last)
> {color:#00a250}<ipython-input-63-074429099c0c>{color} in
> {color:#60c6c8}<module>{color} {color:#00a250}----> {color}
> {color:#00a250}1{color}
> g{color:#208ffb}.{color}E{color:#208ffb}({color}{color:#208ffb}){color}{color:#208ffb}.{color}hasLabel{color:#208ffb}({color}within{color:#208ffb}({color}{color:#208ffb}'nepheu'{color}{color:#208ffb},{color}
> {color:#208ffb}'uncle'{color}{color:#208ffb},{color}
> {color:#208ffb}'cousin'{color}{color:#208ffb}){color}{color:#208ffb}){color}{color:#208ffb}.{color}drop{color:#208ffb}({color}{color:#208ffb}){color}{color:#208ffb}.{color}toList{color:#208ffb}({color}{color:#208ffb}){color}{color:#e75c58}
> {color}
> {color:#007427} 2{color}
> {color:#e75c58}#g.E().hasLabel('neveu').drop().toList(){color}
> {color:#007427} 3{color}
> {color:#e75c58}#g.E().hasLabel('oncle').drop().toList(){color}
> {color:#007427}4{color}
> {color:#e75c58}#g.E().hasLabel('cousin').drop().toList(){color}
>
> {color:#00a250}~/.local/lib/python3.7/site-packages/gremlin_python/process/traversal.py{color}
> in {color:#60c6c8}within{color}{color:#208ffb}(*args){color}
> {color:#007427}316{color}
> {color:#007427}317{color} {color:#00a250}def{color}
> within{color:#208ffb}({color}{color:#208ffb}*{color}args{color:#208ffb}){color}{color:#208ffb}:{color}
> {color:#00a250}--> {color}
> {color:#00a250}318{color} {color:#00a250}return{color}
> P{color:#208ffb}.{color}within{color:#208ffb}({color}{color:#208ffb}*{color}args{color:#208ffb}){color}
> {color:#007427} 319{color}
> statics{color:#208ffb}.{color}add_static{color:#208ffb}({color}{color:#208ffb}'within'{color}{color:#208ffb},{color}within{color:#208ffb}){color}
> {color:#007427}320{color}
> {color:#00a250}~/.local/lib/python3.7/site-packages/gremlin_python/process/traversal.py{color}
> in {color:#60c6c8}within{color}{color:#208ffb}(*args){color}
> {color:#007427} 253{color} {color:#208ffb}@{color}staticmethod
> {color:#007427}254{color} {color:#00a250}def{color}
> within{color:#208ffb}({color}{color:#208ffb}*{color}args{color:#208ffb}){color}{color:#208ffb}:{color}
> {color:#00a250}-->{color}
> {color:#00a250} 255{color} {color:#00a250}return{color}
> P{color:#208ffb}({color}{color:#208ffb}"within"{color}{color:#208ffb},{color}
> {color:#208ffb}*{color}args{color:#208ffb}){color}
> {color:#007427} 256{color}
> {color:#007427} 257{color} {color:#208ffb}@{color}staticmethod
>
> {color:#e75c58}TypeError{color}: __init__() takes from 3 to 4 positional
> arguments but 5 were given
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)