Python: How can I create a Python project compatible to Python 2 and Python 3? -
i want create package should compatible python 2.7 , python 3.3. logic should exist once.
how represent programming logic - in python 2.7 or python 3.3? or choose different way?
edit: how issue handled in core?
you quite using bits of language same, , having conditions or exception handling during other parts.
this harder or easier depending on software do, , versions of python need support. supporting python 2.6, 2.7 , 3.3 becomes relatively simple.
exactly how not answerable in question on so, because there lot it.
i recommend check out book: http://python3porting.com/ , chapter "supporting python 2 , 3 without 2to3 conversion" , appendices, has loads of examples of how solve incompatibilities.
the six library may useful.
Comments
Post a Comment