Keyword arguments to functions

12 views
Skip to first unread message

ariel.balter

unread,
May 29, 2012, 5:36:38 PM5/29/12
to shedskin-discuss
Do you think shedskin will ever be able to use keyword arguments to
functions?

Mark Dufour

unread,
May 30, 2012, 6:02:08 AM5/30/12
to shedskin...@googlegroups.com
hi ariel,

On Tue, May 29, 2012 at 11:36 PM, ariel.balter <ariel....@gmail.com> wrote:
> Do you think shedskin will ever be able to use keyword arguments to
> functions?

I guess it's technically possible to support statically typed *args
and **kwargs, but I think it's one of those features that are not that
useful to support for the kinds of programs shedskin targets, while
being somewhat of a pain to actually support.. in this case they are
also easy to replace with a list or dictionary, which doesn't help in
the motivation department.

note that we actually use restricted forms of *args and **kwargs (for
known keywords) inside shedskin/lib to be able to support some
functions that depend on this functionality (itertools.chain,
os.path.join..). this would be quite some work to generalize though..

thanks,
mark.
--
http://www.youtube.com/watch?v=E6LsfnBmdnk
Reply all
Reply to author
Forward
0 new messages