469,916 Members | 2,115 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,916 developers. It's quick & easy.

255 argument limit?

Hello:

It appears that there is a 255 argument limit in Python 2.4.3?
>>packed_data = struct.pack("260i",
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21
,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,3 8,39,40,41,42,43,44,45,46,
47,4
8,49,50,1,1,1,1,1,1,1,1,1,60,1,2,3,4,5,6,7,8,9,70, 1,2,3,4,5,6,7,8,9,80,1,2,3
,4,5
,6,7,8,9,90,1,2,3,4,5,6,7,8,9,100,1,2,3,4,5,6,7,8, 9,110,1,2,3,4,5,6,7,8,9,12
0,1,
2,3,4,5,6,7,8,9,130,1,2,3,4,5,6,7,8,9,140,1,2,3,4, 5,6,7,8,9,150,1,2,3,4,5,6,
7,8,
9,160,1,2,3,4,5,6,7,8,9,170,1,2,3,4,5,6,7,8,9,180, 1,2,3,4,5,6,7,8,9,190,1,2,
3,4,
5,6,7,8,9,200,1,2,3,4,5,6,7,8,9,210,1,2,3,4,5,6,7, 8,9,220,1,2,3,4,5,6,7,8,9,
230,
1,2,3,4,5,6,7,8,9,240,1,2,3,4,5,6,7,8,9,250,1,2,3, 4,5,6,7,8,9)
SyntaxError: more than 255 arguments

Is there a way to increase this limit?
(This is just a made up example, I would not normally do this).

Thanks in advance:
Michael Yanowitz
Oct 25 '06 #1
1 3037
>
It appears that there is a 255 argument limit in Python 2.4.3?
maybe the argument limit is for the sake of not making functions too
complicated.
if your function takes more than 200 arguments it can probably go to
thedailywtf.com,
better be strict like i am and even avoid making a 100 arguments
function.

:)

Oct 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by redneck_kiwi | last post: by
134 posts views Thread by James A. Donald | last post: by
64 posts views Thread by Morgan Cheng | last post: by
reply views Thread by Dave E. | last post: by
11 posts views Thread by subramanian100in | last post: by
30 posts views Thread by Angel Tsankov | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.