metaclasses

Gonçalo Rodrigues op73418 at mail.telepac.pt
Tue Jul 29 15:30:20 CEST 2003


On Tue, 29 Jul 2003 08:25:26 +1000, Simon Burton
<simonb at webone.com.au> wrote:

>
>It seems this is a more general way to build classes than inheritance.
>Is this a reasonable viewpoint?
>

Yes, it's reasonable. A class statement is syntactic sugar for a call
to the type constructor. As for the usefullness of the POV that's a
whole different matter:

"Metaclasses are deeper magic than 99% of users should ever worry
about. If you wonder whether you need them, you don't (the people who
actually need them know with certainty that they need them, and don't
need an explanation about why)." -- Tim Peters 

Mr. Tim Peters is always right. 

With  my best regards,
G. Rodrigues




More information about the Python-list mailing list