On 17 February 2012 14:04, leam hall <leamh...@gmail.com> wrote:
> My concern with variables is that they have to be passed in specific
> order to the function, and they may have to have their type set
> multiple times so that you can perform the right functions on them. In
> a dict you could set it on insert and not have to worry about it.

There is **kwargs which is behaves like a dict. This is very powerful
but comes with the drawback that you have to make sure you get all the
variables you need for your function to work properly.

I found [1] that is a decent explanation of how these work. Other
might have better explanations.

Greets
Sander
[1] http://basicpython.com/understanding-arguments-args-and-kwargs-in-python/
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to