[Biopython-dev] Bio.SubstMat (was: Re: Calculating motif scores)
Peter
biopython at maubp.freeserve.co.uk
Sat Jul 25 21:18:41 UTC 2009
On Sat, Jul 25, 2009 at 4:28 PM, Michiel de Hoon<mjldehoon at yahoo.com> wrote:
> ...
>
> 2) The print_mat method. It would be more Pythonic to use __str__,
> __format__ for this, though the latter is only available for Python
> versions >= 2.6.
You can define a __format__ method on older versions of Python,
it just won't do anything. For the SeqRecord and Alignment we
have already added these, and also included a format method
as an alias (principly to make the funcationality available on
pre-Python 2.6). Using the __format__ method requires some
concept of format names...
The "print_mat" function sounds like it has similarities to the
"pretty print" code for trees that has come up on the Tree/TreeIO
thread. The existing Bio.Nexus tree object already has something
as the "display" method.
I'd have so spend some time looking at the code in more details
to comment on the other issues.
Peter
More information about the Biopython-dev
mailing list