[Python-3000] Generic function PEP won't make it in time
Daniel Stutzbach
daniel at stutzbachenterprises.com
Tue Apr 24 19:18:15 CEST 2007
On 4/24/07, Guido van Rossum <guido at python.org> 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
More information about the Python-3000
mailing list