[Zope] Python: methods arguments limited to 256?
Julio Silva
jsilva at personalis.pt
Thu Apr 15 14:07:56 EDT 2004
At 09:01, you wrote:
>Julio Silva wrote:
>>Hi,
>>I have a python script in which I call a zsqlmethod and pass to it some args,
>>If I pass 255 args everything ok (dont ask why I need so many args its
>>not your business :-),
>
>Dont care, passing that many args is not good design :)
Well... we could start a thread on that matter but we dont have time, I
find some real exceptional cases in my programming life, specialy in my
glueware legacyware programming.
Suppose you use zope to migrate legacy databases and suppose you find
yourself with a legacy table with 400 fields, there you must start your
brain in high creative mode and with default value infinite on patience
variable :-)
>>If I pass more than 255 args to zsqlmethod then when hitting the python
>>script "save changes" button I get the following error (Note: the error
>>appears when clicking the save changes button of the Python Script):
>
>Works here (can't believe I actually tried it). Even if it didn't work I
>happily consider this a reasonable limitation :)
>
>You probably have a character thats not in the standard ASCII range, eg:
>if you cut and paste from Word or have a unicode character.
Thanks for you help Andy, but I'm positive certain by the debug I'm making
that if I pass 255 parameters its ok, once I pass the 256th the error begin
to arise, I have measures to certify there
is no character encode problem, that was the first thing I checked.
Make this test: create a python script and copy the code below into it and
try to "save changes"
you get the error. take out one parameter and hit "save changes" again you
will be able to save the document with no errors.
---------------------------------------------------
values=[]
container.myzsqlmetho(
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a'],
a=values['a']
)
-------------------------------------------------
Best Regards,
Julio Silva
-------------- next part --------------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 20/02/04
More information about the Zope
mailing list