[Biopython-dev] [Bug 2351] Make Seq more like a string, even subclass string?

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Nov 7 04:55:50 UTC 2007


------- Comment #10 from mdehoon at ims.u-tokyo.ac.jp  2007-11-06 23:55 EST -------
> One side effect of subclassing directly is the .data property will vanish
> (the internal string/array of the Seq/MutableSeq object). 
> Some people will be using this (especially as it was actually used in some
> older versions of the tutorial).

If we add
        self.data = self
in the __init__ method of the Seq/MutableSeq classes, then the .data property
can still be used as before, without using significantly more memory.

> I propose we make the Seq/MutableSeq object act more string like (fix
> str(my_seq) etc) for the next release and officially declare the .data
> deprecated in the documentation.  This should be backwards compatible - expect
> where anyone used the str(my_seq) to get a truncated string deliberately.  
> Then shift to actual subclasses for a later release.

As we can keep the seq.data property even after subclassing, how about
subclassing right away for the next release?

Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the Biopython-dev mailing list