I
I
Ilya2014-04-06 21:10:59
Python
Ilya, 2014-04-06 21:10:59

Problem(?) with python plugin in Netbeans

I have Netbeans 8.0 with a Python plugin , and a function:

def func(*objects, n=value1, m=value2):	
  pass

which Netbeans swears at like this:
mismatched input 'n' expecting DOUBLESTAR

mismatched input '=' expecting RPAREN

mismatched input '=' expecting RPAREN

mismatched input 'value1' expecting COLON

mismatched input ')' expecting NEWLINE

mismatched input ')' expecting NEWLINE

Apparently, he does not like the order of the arguments and after *objects he already expects only **dictionary, although, it seems, in python (at least 3rd) named arguments after the collection are normal.
The interpreter naturally does not swear at such a function.
Does anyone have any thoughts, where to dig and how to fight?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey K, 2014-04-07
@mututunus

He doesn't like the order of the arguments.
Do this:

def func(n=value1, m=value2, *objects):	
    pass

Or like this:
def func(*objects, **kwargs):	
    pass

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question