max length of a python program

Andrew Dalke adalke at
Thu Aug 21 19:25:51 CEST 2003

> Is there a limit to the # of lines that can be in a Python program?

Many years ago there was a limit of 64K lines, because of how
the line number opcode worked in Python.  Only machine
generated Python code ever ran into that limit.

That limit was removed in .. 1.5?  Can't find mention of
the fix in my cursory search.

So no, no effective limit.

                    dalke at

More information about the Python-list mailing list