[py3porters-devel] Porting of apt-listchanges to Python 3
Barry Warsaw
barry at debian.org
Wed Jun 3 15:58:56 UTC 2015
On Jun 02, 2015, at 07:05 PM, James Lu wrote:
>I also adjusted many imports using "try, import Y, except ImportError, import
>X as Y" clauses, which preserve compatibility even though many libraries have
>renamed in Python 3.
This is one area where I think the six package really helps. Generally I
don't use much of six, preferring to handcraft bilingual compatibility, but
that can get pretty tedious for renamed imports. So if I have a lot of these,
I'll add a dependency on six and use their nice shim for stdlib imports.
Cheers,
-Barry
More information about the py3porters-devel
mailing list