[Biopython-dev] Bio.Restriction "super" call (Python vs PyPy?)

Peter Cock p.j.a.cock at googlemail.com
Sat Nov 26 13:38:26 UTC 2011


On Saturday, November 26, 2011, Eric Talevich <eric.talevich at gmail.com>
wrote:
> On Fri, Nov 25, 2011 at 8:24 PM, Brad Chapman <chapmanb at 50mail.com> wrote:
>>
>> Peter;
>>
>> > >> super(RestrictionType, cls).__init__(cls, name, bases, dct)
>> > >
>> > > That seems strange: the __init__ is calling super on itself. You'd
>> > > normally expect this from a derived class. I'm not sure why this
>> > > doesn't trigger an infinite recursion initializing the object. I'm +1
>> > > on commenting it out.
>>
>> > I suppose we could be cautious and skip that line under PyPy
>> > only. How about that as a compromise - that way if is really
>> > is important for something not covered in the unit test, we only
>> > break it under PyPy, but C Python and Jython would be fine?
>>
>> My vote would be to comment it out generally instead of if_pypy
>> flags. I don't want to break anything, but if we do I'd rather find out
>> straight away instead of chasing down platform specific bugs later. I'd
>> be happy to hear other's opinions, especially if they ynderstand the
>> super magic going on.
>>
>
> I support that, and maybe we can add some more unit tests to
> see if we can find out what breaks, if anything.

OK

> Looking at the Bio/Restriction/Restriction.py, I can suggest these
> candidates:

Great - do you want to try to turn those into unit tests?

Thanks,

Peter



More information about the Biopython-dev mailing list