At 05:30 PM 3/12/2007 -0700, Guido van Rossum wrote:
>I don't know about sealed, but using class attributes topassing
>parameter (other than the namespace itself) to the metaclass seems a
>pretty lousy mechanism, and keyword arguments in the classdef are a
>much cleaner solution for this need. For example, this solves the
>problem that those attributes remain in the class dict but aren't
>necessarily candidates for inheritance
Ah, I missed that point about the new kwargs mechanism! Before I was +0 on
*args/**kw, now I'm +1. I've actually needed that feature more than once,
but have been doing it with specialized in-body class decorators, like this:
class FooService(context.Service):
context.replaces(BarService)
...
Which could presumably now become:
class FooService(context.Service, replaces=BarService):
...
Right?
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com