[plt-scheme] Re: apply vs dot notation syntax

From: kbohdan at mail.ru (kbohdan at mail.ru)
Date: Sun Oct 5 12:33:48 EDT 2008

Carl Eastlund wrote:
<snip>
> I don't know much about Python.  If args = list(a,b,c) and kwargs =
> dict(d=1,e=2), then does f(arg1,arg2,*args,**kwargs) mean
> f(arg1,arg2,a,b,c,d=1,e=2)?  

Exactly

> If so, then Scheme has about the same
> thing as keyword-apply.  You can express (f x y a b c #:d 1 #:e 2) as
> (keyword-apply f (list '#:d '#:e) (list 1 2) x y (list a b c)).  The
> use of apply or keyword-apply signals that you're not doing direct
> application, whereas in Python you look at *s in front of arguments to
> figure it out.  

Shame to me. Missed keyword-apply when looking in docs. Thx.

> Same idea, just slightly different ways of writing it down.

Rigth (with some minor differences).

> Does that answer your question?

Not exactly. The answer is clear for PLT, but why this all is not in 
r6rs? If this question sounds too OT, please ignore it.

--
Bohdan




Posted on the users mailing list.