[Tutor] Porting

Steven D'Aprano steve at pearwood.info
Sun Mar 4 08:49:15 CET 2012


On Sun, Mar 04, 2012 at 12:02:37PM +0530, Ejaj Hassan wrote:
> Hello,
>   I am a novice in python development. I just came across this "Python
> porting 2.7 to 3.x" .
> I am just confused with this. Please tell me the whole meaning of it.


Programmers talk about "porting" when they take code written in one 
language (say Java) and re-write it in another language (say, Python).

Python 2.x (2.5, 2.6, 2.7) code is *slightly* different from Python 3.x 
code, like British English and American English. Just enough that many 
Python 2.x programs almost, but not quite, work in Python 3.x, and the 
same the other way around.

So when you take a Python program written for version 2.7, and change it 
to work in Python 3.x, that's called "porting" too.


-- 
Steven



More information about the Tutor mailing list