The following code in python2.6 causes a syntax error
>>> def f(a,*args,c): File "<stdin>", line 1 def f(a,*args,c): ^ SyntaxError: invalid syntax
but this syntax is valid in python3.0. I would like to know what I should import in my interpreter for it to work. i.e. from import __future__ ????
to import print function from 3.0, I would do from __future__ import print_function
similarly, this definition is not valid in 2.6
def f(a,*b,c=5,**kwargs):
while it is legal in version 3.0
brain storm
source share