[BioPython] The count method of a Seq (or MutableSeq) object
Peter
biopython at maubp.freeserve.co.uk
Thu Mar 5 11:35:10 EST 2009
On Thu, Mar 5, 2009 at 3:23 PM, Noel O'Boyle <baoilleach at gmail.com> wrote:
> I think we are arguing here over which should be the default value.
>
> Several people here believe that behaviour analagous to Python's
> string.count will reduce bug reports and user confusion. However,
> no-one except Leighton has been able to come up with a single use case
> where the current behaviour is useful (and even that example, with
> respect, was flimsy). So we end up with a method with adheres
> magnificently to the principle of least surprise, but which is of no
> use to users. Aren't you trying to provide methods which are useful
> for biological analysis? Isn't that the purpose of wrapping the string
> in the first place?
>
> Noel (getting far too excited over painting this bikeshed)
If we hadn't been shipping Biopython with the old non-overlapping
python-string-like count method for the last year, I would have
probably have been more willing to agree that the Seq count method
could differ from the python-string and use an overlapping search.
However, changing it now also breaks backwards compatibility which
shouldn't be done lightly. We could still do this (implementation
discussion on the dev list or the Bug 2779), but will have to make
this change very clear in the release notes.
Peter
More information about the BioPython
mailing list