Should probably clean up my code properly before submitting, to hide
some of the noobish errors like forgetting to put quotes round
strings...
>>> class Demo(object):
... def __init__(self, name="", surname="", age=0):
... print name, surname, age
...
>>> Demo(name='Ri
2009/9/18 Manuel de la Pena :
> Hello,
>
>
> I have done a decorator that I used to ensure that the keyword arguments
> passed to a constructor are the correct/expected ones. The code is the
> following:
>
> from functools import wraps
>
> def keyargs_check(keywords):
> """
> This decorator ensure
Hello,
I have done a decorator that I used to ensure that the keyword arguments
passed to a constructor are the correct/expected ones. The code is the
following:
from functools import wraps
def keyargs_check(keywords):
"""
This decorator ensures that the keys passed in kwargs are the onces tha