Metaclasses help :-)

Christian Tanzer tanzer at swing.co.at
Mon Oct 28 17:38:16 CET 2002


sismex01 at hebmex.com wrote:

> I'm looking to create a metaclass which will check __init__'s
> keyword arguments *before* they're passed to __init__.
>
> Any tiny example will be very much appreciated.

I've got no time to make an example for you but I can give you a hint:
`Class.__init__` is normally called by `Metaclass.__call__`.

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92





More information about the Python-list mailing list