web2py makes extensive use of these. Take the A, DIV, or TABLE as examples,
you can pass HTML attributes (e.g. _class, _id, _style) to these, but if you
look at the code, you will notice that these things are not in the signature
of these methods. They allow you to provide an unknown number of p
pardon me, what is the meaning of *args and **vars?
thank you.
fixed in trunk. Thanks
On Jun 9, 9:24 am, Pawel Jasinski wrote:
> hi,
> sorry for being to cryptic.
>
> In [1]: def foo(*args,**kwargs):
> ...: print vars
> ...:
> ...:
>
> In [2]: foo()
>
>
> In [3]: def bar(*args,**vars):
> ...: print vars
> ...:
> ...:
>
> In [4]: b
Now I understand. It is a problem witg the example. Will fix it.
On Jun 9, 9:24 am, Pawel Jasinski wrote:
> hi,
> sorry for being to cryptic.
>
> In [1]: def foo(*args,**kwargs):
> ...: print vars
> ...:
> ...:
>
> In [2]: foo()
>
>
> In [3]: def bar(*args,**vars):
> ...: pri
hi,
sorry for being to cryptic.
In [1]: def foo(*args,**kwargs):
...: print vars
...:
...:
In [2]: foo()
In [3]: def bar(*args,**vars):
...: print vars
...:
...:
In [4]: bar()
{}
ref: http://docs.python.org/library/functions.html#vars
as I said, it is cosmetic. I bel
I do not understand. :-(
On Jun 9, 3:21 am, Pawel Jasinski wrote:
> hi,
> it is cosmetic, but can be a pain for someone no so familiar with
> python.
> In examples for restful api:
>
> def index():
> def GET(*args,**vars):
> patterns = [
> "/persons[person]",
>
6 matches
Mail list logo