Generic constructors and duplication of internal Python logic
Michele Simionato
michele.simionato at poste.it
Thu Apr 15 04:33:02 EDT 2004
jjl at pobox.com (John J. Lee) wrote in message news:<87ekqq41ya.fsf at pobox.com>...
> I have to check things like:
>
> -are there too many positional arguments?
> -any unexpected keyword arguments?
> -multiple keyword arguments?
> -any duplication between positional and keyword arguments?
>
> etc.
>
> Surely there's some easy way of making use of Python's internal logic
> here? For some reason, I can't see how. Can anybody see a way?
>
>
> John
Have you thought of performing the checks in the __call__ method
of a custom metaclass?
Michele Simionato
More information about the Python-list
mailing list