<br><br><div><span class="gmail_quote">On 4/25/07, <b class="gmail_sendername">Josiah Carlson</b> &lt;<a href="mailto:jcarlson@uci.edu">jcarlson@uci.edu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>If your unit tests take hours to run, then you aren&#39;t going to get<br>anything useful from the ABC requirements for hours either (unless you<br>are pre-instantiating everything you are going to use during program<br>
execution, in which case this could become your unittest).</blockquote><div><br>No, the ABC requirements are checked as soon as a module is imported (i.e., classes are checked at definition time not when an instance is created). I have been using my own ABC implementation for quite a while and it has repeatedly proven it&#39;s value when I create a new derived class and forget to implement a necessary method.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Please remember that this isn&#39;t about Java style type checking and<br>verification during compilation.&nbsp;&nbsp;This is, strictly speaking, ABC
<br>checking on object instantiation, method invocation, and possibly even<br>argument verification.&nbsp;&nbsp;This isn&#39;t the magic bullet you are looking for<br>(you&#39;ll have to go to one of those static typed languages for that).
</blockquote><div><br>Again, I disagree. With metaclasses it is easy and useful to have checking at class definition (see <a href="http://web.mit.edu/~emin/www/source_code/py_abc/abc.py">http://web.mit.edu/~emin/www/source_code/py_abc/abc.py
</a> for an example of what I mean). Generally I don&#39;t want static checking, but occasionally it is nice to have something like that and ABCs provide a good way to do that. <br><br>I&#39;m not claiming that is the only benefit of ABCs. I&#39;m just pointing out what I find to be a very useful feature of ABCs that I hope makes into python.
<br></div></div>