<span class="gmail_quote">On 4/25/07, <b class="gmail_sendername">Guido van Rossum</b> <<a href="mailto:email@example.com">firstname.lastname@example.org</a>> wrote:</span><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
IIUC, Emin's framework requires you to explicitly declare any class as<br>abstract that has abstract methods.</blockquote><div><br>I believe that is an easily fixable implementation issue, which I would be happy to remedy.
<br><br>I think a bigger issue is whether to check at definition time or check at instantiation time. It seems to me the former has the benefit of catching errors earlier and potentially saving time. I don't immediately see the advantage of the latter (probably that is due to my lack of imagination).
<br><br>I would like to see the PEP include the ability to (optionally) enforce ABC requirements at definition time. For example, you could set an attribute (e.g., __check_abstract__) or inherit from something special if you want to turn enforcement on (if not checking at def time is the default) or turn it off (if checking at def time is the default). I am not recommending that anyone be forced to conform to this to use anything in the standard library.
<br><br>I think this would be useful, not conflict with the other goals of the PEP, and be relatively easy to implement in pure python (as illustrated by my example implementation). If others find this useful (or at least not objectionable), I would be happy to help with the implementation or writing additional material for the PEP or even propose it separately if people think this distracts from the point of the original ABC PEP.