On 4/24/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> I'm not afraid of breaking new ground. Since the fact of the matter is
> that we can't prevent abstract methods from having a body (that would
> require syntactic support for abstract methods which is out of scope
> here) we might as well make good use of the body.
Sure, we could.
class SomeABC:
some_abstract_method = AbstractMethod
where "AbstractMethod" is a singleton. This is similar to C++'s "= 0"
syntax for pure virtual functions.
Unfortunately, that would leave no place for docstrings, so I like the
existing proposal better (@abstract).
--
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
_______________________________________________
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