Metaclasses?
Michael Hudson
mwh21 at cam.ac.uk
Tue Apr 25 17:47:33 EDT 2000
Robb Shecter <shecter at darmstadt.gmd.de> writes:
> I read an old post about metaclasses (included on the cd-rom with
> the book "Mit Python programmieren"), and got very interested,
> because I imagine that by making a new metaclass, I could maybe fix
> the one thing about Python that annoys me: the obligatory use of
> "self" in method declarations and variable access. (Python's syntax
> is so clean and neat in all other areas, I feel like it's a shame
> that there's excess verbosity in this one place.)
a) No, metaclasses are unlikely to "help".
b) How, when you've "fixed" Python do you propose, in method bodies,
to distinguish between local and instance variables? I might drop
my longstanding habit of complaining about people complaining about
the necessity of "self" if you can answer this question...
> So - are metaclasses just a random idea, or is there something in
> the works?
Metaclasses are real, but have this tendency to make one's head
explode...
Cheers,
M.
--
If i don't understand lisp, it would be wise to not bray about
how lisp is stupid or otherwise criticize, because my stupidity
would be archived and open for all in the know to see.
-- Xah, comp.lang.lisp
More information about the Python-list
mailing list