On Thu, Aug 28, 2008 at 6:48 PM, Fernando Perez <[EMAIL PROTECTED]>wrote:

> On Thu, Aug 28, 2008 at 5:26 PM, Charles R Harris
> <[EMAIL PROTECTED]> wrote:
> > Where does _assert_func come from in this fragment from a test class?
> >
> > class _GenericTest(object):
> >     def _test_equal(self, a, b):
> >         self._assert_func(a, b)
> >
> > I hope it isn't monkey patched in.
>
> It could be meant as a mix-in, case in which it would be ok for the
> class to be incomplete as written.  A bit surprising, but not
> necessarily incorrect.
>
> If it's not meant to be a base/mix-in class, then it's a good ole'bug.
>

Turns out it's defined in a derived class, which I suppose makes it a mix-in
class. Looks kinda like the python version of pure virtual functions in C++
base classes. It's a bit surprising to see a python pattern that's more
obscure than C++ ;) I'm not sure I like its usage here -- implementation
rather than is a -- but I'm not going to clean it up.

Chuck
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to