[Biopython-dev] long for longitude in Bio.Phylo and Python 3

Eric Talevich eric.talevich at gmail.com
Thu Jul 29 00:08:37 EDT 2010


On Mon, Jul 26, 2010 at 1:19 PM, Peter <biopython at maubp.freeserve.co.uk>wrote:

> On Mon, Jul 26, 2010 at 6:04 PM, Eric Talevich <eric.talevich at gmail.com>
> wrote:
> > On Mon, Jul 26, 2010 at 12:47 PM, Peter <biopython at maubp.freeserve.co.uk
> >wrote:
> >
> >> Hi Eric et all,
> >>
> >> Background: Eric has found a problem in Bio.Phylo with variables,
> arguments
> >> and properties called "long" for longitude which the 2to3 script is
> wrongly
> >> converting into "int", see: http://bugs.python.org/issue2734
> >>
> >> If the remaining issue with Bug 2734 is fixed, we would still have a
> >> problem
> >> running the conversion with 2to3 as included with all releases of Python
> to
> >> date (i.e. 2.6, 2.7, 3.1), which would complicate deployment.
> >>
> >> Eric: It could break backwards compatibility, but would a switch from
> lat &
> >> long to latitude and longitude be the least painful solution? Do you
> think
> >> we could support both names as part of a deprecation cycle?
> >>
> >> Peter
> >>
> >
> > The names "lat", "long" and "alt" are from the phyloXML spec, so it's
> > convenient to keep them the same in Biopython. But I could change them to
> > the longer form if that's needed. The parser and serializer assume the
> > attribute names match the XML spec in general, and special-case names
> that
> > won't work in Python (like "from").
> >
>
[...]

>
> If "2to3 --nofix=long" doesn't cause us problems elsewhere, that will
> be a neater solution.
>

>From my testing just now, "2to3 --nofix=long" seems to be fine. I don't see
any new errors introduced by it.

-Eric


More information about the Biopython-dev mailing list