[Biopython-dev] test_AlignIO to python 3
Tiago Antão
tiagoantao at gmail.com
Mon Jul 5 11:38:20 UTC 2010
2010/7/5 Peter Cock <p.j.a.cock at googlemail.com>:
> Or just test_seq.py or test_Seq_objs.py which are more low level ;)
Glad you raise these 2, as I want to discuss them.
2 changes:
1. to test_Seq_objs.py add
import sys
if sys.version_info[0] == 3:
maketrans = str.maketrans
else:
from string import maketrans
2. (more serious) array.array("c", ...) is no more (the c).
Maybe self.data = array.array("u", data) ? With ifs per version. This
affects test_seq.py and Seq.py
Regarding commits (e.g. the sort case).
I can commit general corrections, e.g. a single sort with a key for
all versions or put some ifs (use the old code for 2.x and new code
for 3). The first option is cleaner, the second safer. I warm up to
the cleaner version: the changes are trivial (and trivial to roll
back, should the need arise).
More information about the Biopython-dev
mailing list