[Biopython-dev] [Biopython] type object 'RestrictionType' has no attribute 'size'
p.j.a.cock at googlemail.com
Thu Dec 5 05:30:27 EST 2013
On Thu, Dec 5, 2013 at 10:01 AM, Wibowo Arindrarto
<w.arindrarto at gmail.com> wrote:
> Hi everyone,
> Christopher: Ah yes, I actually meant the IPython notebook (but I
> guess it turns out the same occurs in the IPython console then :) ).
> Antony: That may be the case, too. But thanks for the pull request (I
> think Peter has just looked at it, actually
> https://github.com/biopython/biopython/pull/148). I do think there is
> room for improvement there, especially since the code probably
> predates modern Python conventions (& assumptions).
Even Frederic Sohm (the original author) agreed that the current
Bio.Restriction code is too complicated (I called it 'magic' in our
discussion back in 2010 regarding a Python 2.6 problem with
or now https://redmine.open-bio.org/issues/2604 ).
And also I dislike the fact it does one-based counting. However,
none of our currently active developers really understand the
code so changing it is hard - and backward compatibility constrains
I think the best route forward is to replace Bio.Restriction with a
new less complicated implementation trying to follow modern
Python conventions (using zero-based counting!), likey based
on Antony's branch https://github.com/biopython/biopython/pull/148
and then deprecate and later remove Bio.Restriction.
(We should continue that debate on the biopython-dev list, CC'd)
In terms of Christopher's problems - it would not surprise me
if they are specific to IPython since introspection of the 'magic'
classes seems problematic.
More information about the Biopython-dev