473,856 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

255 argument limit?

Hello:

It appears that there is a 255 argument limit in Python 2.4.3?
>>packed_data = struct.pack("26 0i",
0,1,2,3,4,5,6,7 ,8,9,10,11,12,1 3,14,15,16,17,1 8,19,20,21
,22,23,24,25,26 ,27,28,29,30,31 ,32,33,34,35,36 ,37,38,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,1 2
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 3296
>
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2083
by: redneck_kiwi | last post by:
Hi all: I have a really weird problem. I am developing a customer catalog system for my company and as such have delved into sessions for authentication and access levels. So far, I have managed to get a working system just about finished. I am building an interface for our customer service folks to use to manage registered customers and am seeing some weird behavior.
5
5314
by: nifsmith | last post by:
Hi I am trying to learn about Queues and use templates at the same time. I have written the following code and I am getting a link error, stating "unresolved external symbol, "int__cdecl adsq::QInitialise<struct adsq::Data>(struct adsq::Head<struct adsq::Data> *)" -----------adsq.h file
134
7952
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that means that if I misspell a variable name, my program will mysteriously fail to work with no error message. If you don't declare variables, you can inadvertently re-use an variable used in an enclosing context when you don't intend to, or
64
3413
by: Morgan Cheng | last post by:
Hi All, I was taught that argument valuse is not supposed to be changed in function body. Say, below code is not good. void foo1(int x) { x ++; printf("x+1 = %d\n", x); } It should be "refactor-ed" to be
0
1200
by: Dave E. | last post by:
This is a rather perplexing problem that I have never seen before. I have a COM+ component (a function) that takes 14 arguments. Naturally, if I call this function from my aspx code-behind with only 13 arguments I get an error that states that the function is expecting 14 arguments. Fine, no problem; however, when I provide 14 arguments in my function call from my aspx code-behind I get this error: Public member 'MyFunc' on type 'MyLib'...
1
1705
by: tsarevich | last post by:
create type my_type (my_test text, my_int integer); create function my_function(my_type) returns timestamp as 'begin return (current_timestamp); end; ' language 'plpgsql';
11
2415
by: subramanian100in | last post by:
Suppose we have a class named Test. Test obj; // assuming default ctor is available Test direct_init(obj); // direct initialization happens here Test copy_init = obj; // copy initialization happens here Suppose we have a function void fn(Test arg);
30
2700
by: Angel Tsankov | last post by:
Hello! Does the C++ standard define what happens when the size argument of void* operator new(size_t size) cannot represent the total number of bytes to be allocated? For example: struct S { char a; };
30
2768
by: Adam | last post by:
Hi, I have a simple printf-like function: int print(const char *format, ...) { char buffer; va_list argptr; int i;
0
9755
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11048
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10692
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10770
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7928
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5754
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5954
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4567
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4168
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.