Page 2 of 2

Re: on &rest and keyword args...

Posted: Mon Nov 19, 2012 5:45 pm
by Paul
Ah, this must be a recent Python innovation. I haven't really used Python since 1.5 (but the version I have installed is 2.5.1). I get

Code: Select all

>>> def foo(b, x=1, y=2, *vargs, k=4, j=5, **kargs): pass
  File "<stdin>", line 1
    def foo(b, x=1, y=2, *vargs, k=4, j=5, **kargs): pass
                                 ^
SyntaxError: invalid syntax

Re: on &rest and keyword args...

Posted: Tue Nov 20, 2012 4:52 am
by megera
Ahh, that is the question ! :D
I’m starting with 3.1 becouse i’m beginner…and I know that there are important syntax differences with previous releases...
frameworks Python based works still with 2.7 for example…

ps. I apologize to the Moderators for little OT :!: :!:
thanks again to all for your help!!