max length of a python program

?

=?ISO-8859-1?Q?Gerhard_H=E4ring?=

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

The free version from python.org is limited to 500 lines per module.
I'll gladly sell you Python Enterprise 2003, which has no lines of code
limits at all and where code size is only limited by available memory.

The current price is EUR 250 per seat or EUR 5000 for a site-license.
One year of free support via Usenet (comp.lang.python) is included.

-- Gerhard
 
L

Lawrence Oluyede

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

No AFAIK.
The only limitation is the common sense, nobody wants to drown into comments
:)
 
M

Michael Hudson

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

I can't seem to find one, although trying to run a million line file
got the OOM killer into action...


Cheers,
mwh
 
A

Andrew Dalke

Ragu:
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.

Andrew
(e-mail address removed)
 
P

Paul Watson

Lawrence Oluyede said:
No AFAIK.
The only limitation is the common sense, nobody wants to drown into comments
:)

Probably no fear of drowning in comments. It seems that many peole who
write seemingly excesslively long source code files do not want to waste
disk space or processing time on something so useless as comments.
 
C

Christos TZOTZIOY Georgiou

The free version from python.org is limited to 500 lines per module.
I'll gladly sell you Python Enterprise 2003, which has no lines of code
limits at all and where code size is only limited by available memory.

The current price is EUR 250 per seat or EUR 5000 for a site-license.
One year of free support via Usenet (comp.lang.python) is included.

Really? A few years ago, when I bought Python for the first time, the
entry price I paid was my right hand and rights on my firstborn. Things
have changed...

Microsoft Python: bringing innovation to higher levels at a friendly
price.
 
M

Michael Hudson

Christos "TZOTZIOY" Georgiou said:
What is the width of JUMP opcode offsets? If it is 16 bit, is there a
chance that someday somebody is going to write such a large basic block
that their program will fail?

I'm pretty sure that limit has been lifted too (in the 2.0 timeframe?
Not sure). I think you can have basic blocks the full 2^32 bytes long
now :)

Cheers,
mwh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top