[Biopython-dev] Python 2.3
Andreas Kuntzagk
andreas.kuntzagk at mdc-berlin.de
Tue Aug 5 03:33:33 EDT 2003
Am Mon, 2003-08-04 um 18.34 schrieb Michael Hoffman:
> On Fri, 1 Aug 2003, Jeffrey Chang wrote:
>
> > What is everyone's feelings about Python 2.3 for Biopython?
>
> I agree with the previous posters--there are some nice features but it
> isn't essential.
I think the same.
> However, I think the programmers might have a hard
> time resisting using all those new features forever!
I can resist for some time. (At least until I find out by accident, that
the next distribution I install comes with 2.3 preinstalled.
> ;-) We've already
> seen examples of this. It might be a good idea to decide on a
> migration schedule that will give the installed base time to migrate
> to Python 2.3 before we allow check-in of code. Maybe 1 August 2004?
> Don't worry, it will be here before you realize it. :-)
>
> As far as enumerate, I put it into Bio.GFF.GenericTools as soon as I
> saw the PEP (indeed the code came straight out of the PEP), as are
> many other non-biological utility classes/functions. Have fun!
So we already depend on 2.3 ? Or can you use enumerate with 2.2?
The longer I think about enumerate, the more I think it is a useful
feature. Maybe we can change the migration date to September 2003 ;-)
Btw. I was thinking, is there a better way to use the Iterator-classes
in the different Modules?
Up to now, I do it like this:
Parser = GenBank.RecordParser()
File = open ("foo")
Iterator = GenBank.Iterator(File,parser=Parser)
while 1:
record = it.next()
if not record: break
...
I think, nicer looking would be:
File = GenBank.Flatfile("foo",Parser)
for record in File:
# work with record
Can I already do this? Maybe with the new Parsers? (I still haven't
checked it out.)
Andreas
More information about the Biopython-dev
mailing list