[Biopython-dev] syntax of indices for future Alignment object

Michiel de Hoon mdehoon at c2b2.columbia.edu
Sun Jul 29 04:38:28 UTC 2007


Jan Kosinski wrote:
> I just do not see what [A:B:C,X:Y:Z] adds to [A:B,X:Y] in case of 
> alignments. Ins't [A:B,X:Y] sufficient?
> 
[A:B,X:Y] may be sufficient, but does not agree with Python indices for 
other objects (lists, tuples, strings). In addition, since allowing 
[A:B,X:Y] only is different from usual Python usage, we'd actually end 
up writing more code to specifically disallow [A:B:C,X:Y:Z].

Note also that [A:B:C,X:Y:Z] includes [A:B,X:Y] as a special case. So if 
the Alignment class is written to deal with [A:B:C,X:Y:Z], but I'd tell 
you that it expects [A:B,X:Y], then you wouldn't notice any difference. 
Until you'd try [A:B:C,X:Y:Z] and you find out that that works too.

--Michiel.



More information about the Biopython-dev mailing list