473,700 Members | 2,532 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

255 argument limit?


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 ,
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
,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
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 ,
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 ,
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 ,
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 3284
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
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


Oct 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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.
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
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
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
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'...
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';
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);
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; };
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;
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,...
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...
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,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.