on &rest and keyword args...

Discussion of Common Lisp

Re: on &rest and keyword args...

Postby Paul » Mon Nov 19, 2012 5:45 pm

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
Paul
 
Posts: 106
Joined: Tue Jun 02, 2009 6:00 am

Re: on &rest and keyword args...

Postby megera » Tue Nov 20, 2012 4:52 am

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!!
megera
 
Posts: 30
Joined: Wed Oct 10, 2012 1:34 pm

Previous

Return to Common Lisp

Who is online

Users browsing this forum: hill0093, Yahoo [Bot] and 3 guests