473,554 Members | 3,162 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Functions have 32 args limt ???

Hi,

For my supprise I found that functions have 32 parameter limit.

Where to find more info about this limitation or similar limitations ?
I need at least 50, 100 would be ok.

Real life function below:

CREATE OR REPLACE FUNCTION
wpr_KA_I_Person Card_Doc(int,va rchar,varchar,v archar,varchar, varchar,varchar ,
varchar,varchar ,varchar,varcha r,varchar,varch ar,varchar,varc har,varchar,var c
har,varchar,var char,varchar,va rchar,timestamp ,timestamp,bool ean,varchar,tim e
stamp,timestamp ,boolean,varcha r,varchar,times tamp,varchar,va rchar,varchar,b o
olean)
RETURNS void AS '
DECLARE
@DocAction ALIAS FOR $1;
-- 1 - Load Document
-- 2 - Update Header
@SessionID ALIAS FOR $2; -- Session ID
@LockID ALIAS FOR $3; -- Lock ID
@Lang ALIAS FOR $4; -- Language
@PersonID ALIAS FOR $5;

@MainPersonCode ALIAS FOR $6;
@SurName ALIAS FOR $7;
@FirstName ALIAS FOR $8;
@FatherName ALIAS FOR $9;
@Phone ALIAS FOR $10;
@WorkPhone ALIAS FOR $11;
@GSM ALIAS FOR $12;
@Email ALIAS FOR $13;
@State ALIAS FOR $14;
@CountyCode ALIAS FOR $15;
@CountyName ALIAS FOR $16;
@MunicipalityCo de ALIAS FOR $17;
@MunicipalityNa me ALIAS FOR $18;
@Address ALIAS FOR $19;
@ZipCode ALIAS FOR $20;
@PermissionToRe sideNr ALIAS FOR $21;
@PermissionToRe sideFrom ALIAS FOR $22;
@PermissionToRe sideTo ALIAS FOR $23;
@NotCitizen ALIAS FOR $24;
@WorkPermitNr ALIAS FOR $25;
@WorkPermitFrom ALIAS FOR $26;
@WorkPermitVali dTo ALIAS FOR $27;
@NotResident ALIAS FOR $28;
@ResidentState ALIAS FOR $29;
@HeathyCardCode ALIAS FOR $30;
@HeathyCardVali dTo ALIAS FOR $31;
@BankAccount ALIAS FOR $32;
@BankCode ALIAS FOR $33;
@Sex ALIAS FOR $34;
@Smoke ALIAS FOR $35;
BEGIN
END;
' LANGUAGE 'plpgsql';


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #1
20 2382
You might fnd a RECORD type better.

Ivar wrote:
Hi,

For my supprise I found that functions have 32 parameter limit.

Where to find more info about this limitation or similar limitations ?
I need at least 50, 100 would be ok.

Real life function below:

CREATE OR REPLACE FUNCTION
wpr_KA_I_Perso nCard_Doc(int,v archar,varchar, varchar,varchar ,varchar,varcha r,
varchar,varcha r,varchar,varch ar,varchar,varc har,varchar,var char,varchar,va rc
har,varchar,va rchar,varchar,v archar,timestam p,timestamp,boo lean,varchar,ti me
stamp,timestam p,boolean,varch ar,varchar,time stamp,varchar,v archar,varchar, bo
olean)
RETURNS void AS '
DECLARE
@DocAction ALIAS FOR $1;
-- 1 - Load Document
-- 2 - Update Header
@SessionID ALIAS FOR $2; -- Session ID
@LockID ALIAS FOR $3; -- Lock ID
@Lang ALIAS FOR $4; -- Language
@PersonID ALIAS FOR $5;

@MainPersonCode ALIAS FOR $6;
@SurName ALIAS FOR $7;
@FirstName ALIAS FOR $8;
@FatherName ALIAS FOR $9;
@Phone ALIAS FOR $10;
@WorkPhone ALIAS FOR $11;
@GSM ALIAS FOR $12;
@Email ALIAS FOR $13;
@State ALIAS FOR $14;
@CountyCode ALIAS FOR $15;
@CountyName ALIAS FOR $16;
@MunicipalityCo de ALIAS FOR $17;
@MunicipalityNa me ALIAS FOR $18;
@Address ALIAS FOR $19;
@ZipCode ALIAS FOR $20;
@PermissionToRe sideNr ALIAS FOR $21;
@PermissionToRe sideFrom ALIAS FOR $22;
@PermissionToRe sideTo ALIAS FOR $23;
@NotCitizen ALIAS FOR $24;
@WorkPermitNr ALIAS FOR $25;
@WorkPermitFrom ALIAS FOR $26;
@WorkPermitVali dTo ALIAS FOR $27;
@NotResident ALIAS FOR $28;
@ResidentState ALIAS FOR $29;
@HeathyCardCode ALIAS FOR $30;
@HeathyCardVali dTo ALIAS FOR $31;
@BankAccount ALIAS FOR $32;
@BankCode ALIAS FOR $33;
@Sex ALIAS FOR $34;
@Smoke ALIAS FOR $35;
BEGIN
END;
' LANGUAGE 'plpgsql';


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 11 '05 #2
Ivar wrote:
For my supprise I found that functions have 32 parameter limit.

Where to find more info about this limitation or similar limitations ?

I need at least 50, 100 would be ok.


See INDEX_MAX_KEYS defined in src/include/pg_config.h.in
(pg_config_manu al.h in postgres 7.4). Change to 64 or whatever and
recompile. But note that you'll need to dump, initdb, and reload your
data. Also note that there are performance and disk usage tradeoffs --
search the mailing list archives from August 2002 for some test results
and discussion.

Joe
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #3

If I understand right, you cant pass record from client apps, eg. C# or VB.

"Dennis Gearon" <ge*****@firese rve.net> wrote in message
news:3F******** ******@fireserv e.net...
You might fnd a RECORD type better.

Ivar wrote:
Hi,

For my supprise I found that functions have 32 parameter limit.

Where to find more info about this limitation or similar limitations ?
I need at least 50, 100 would be ok.

Real life function below:

CREATE OR REPLACE FUNCTION
wpr_KA_I_Perso nCard_Doc(int,v archar,varchar, varchar,varchar ,varchar,varcha r

,
varchar,varcha r,varchar,varch ar,varchar,varc har,varchar,var char,varchar,va r c
har,varchar,va rchar,varchar,v archar,timestam p,timestamp,boo lean,varchar,ti m e
stamp,timestam p,boolean,varch ar,varchar,time stamp,varchar,v archar,varchar, b

o
olean)
RETURNS void AS '
DECLARE
@DocAction ALIAS FOR $1;
-- 1 - Load Document
-- 2 - Update Header
@SessionID ALIAS FOR $2; -- Session ID
@LockID ALIAS FOR $3; -- Lock ID
@Lang ALIAS FOR $4; -- Language
@PersonID ALIAS FOR $5;

@MainPersonCode ALIAS FOR $6;
@SurName ALIAS FOR $7;
@FirstName ALIAS FOR $8;
@FatherName ALIAS FOR $9;
@Phone ALIAS FOR $10;
@WorkPhone ALIAS FOR $11;
@GSM ALIAS FOR $12;
@Email ALIAS FOR $13;
@State ALIAS FOR $14;
@CountyCode ALIAS FOR $15;
@CountyName ALIAS FOR $16;
@MunicipalityCo de ALIAS FOR $17;
@MunicipalityNa me ALIAS FOR $18;
@Address ALIAS FOR $19;
@ZipCode ALIAS FOR $20;
@PermissionToRe sideNr ALIAS FOR $21;
@PermissionToRe sideFrom ALIAS FOR $22;
@PermissionToRe sideTo ALIAS FOR $23;
@NotCitizen ALIAS FOR $24;
@WorkPermitNr ALIAS FOR $25;
@WorkPermitFrom ALIAS FOR $26;
@WorkPermitVali dTo ALIAS FOR $27;
@NotResident ALIAS FOR $28;
@ResidentState ALIAS FOR $29;
@HeathyCardCode ALIAS FOR $30;
@HeathyCardVali dTo ALIAS FOR $31;
@BankAccount ALIAS FOR $32;
@BankCode ALIAS FOR $33;
@Sex ALIAS FOR $34;
@Smoke ALIAS FOR $35;
BEGIN
END;
' LANGUAGE 'plpgsql';


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 11 '05 #4

I don't see why default is so small.

"Joe Conway" <ma**@joeconway .com> wrote in message
news:3F******** ******@joeconwa y.com...
Ivar wrote:
For my supprise I found that functions have 32 parameter limit.

Where to find more info about this limitation or similar limitations ?

I need at least 50, 100 would be ok.


See INDEX_MAX_KEYS defined in src/include/pg_config.h.in
(pg_config_manu al.h in postgres 7.4). Change to 64 or whatever and
recompile. But note that you'll need to dump, initdb, and reload your
data. Also note that there are performance and disk usage tradeoffs --
search the mailing list archives from August 2002 for some test results
and discussion.

Joe
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 11 '05 #5
>>>>> "Ivar" == Ivar <iv**@lumisoft. ee> writes:

Ivar> I don't see why default is so small.

Because any function with even 32 parameters has about 25 too many
parameters.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<me****@stonehe nge.com> <URL:http://www.stonehenge. com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.St onehenge.com for onsite and open-enrollment Perl training!

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #6
Ivar wrote:
I don't see why default is so small.

"Joe Conway" <ma**@joeconway .com> wrote in message
news:3F******* *******@joeconw ay.com...

Ivar wrote:

For my supprise I found that functions have 32 parameter limit.

Where to find more info about this limitation or similar limitations ?

I need at least 50, 100 would be ok.

See INDEX_MAX_KEYS defined in src/include/pg_config.h.in
(pg_config_ma nual.h in postgres 7.4). Change to 64 or whatever and
recompile. But note that you'll need to dump, initdb, and reload your
data. Also note that there are performance and disk usage tradeoffs --
search the mailing list archives from August 2002 for some test results
and discussion.

Joe
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

32 is small? I've never designed a function with more than 12-18, at teh
MOST, arguments.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 11 '05 #7

It all depends what soft are you doing.

There is for example material card function.
It it designed so bad that it has more than 32 ars.
Why must split this function if behind UI I use it as single function for
adding updateing material ???

CREATE OR REPLACE FUNCTION
wpr_M_I_Materia lCard_Doc(int,v archar,varchar, varchar,varchar ,boolean,boolea n
,boolean,varcha r,varchar,varch ar,varchar,varc har,varchar,var char,varchar,va r
char,varchar,va rchar,varchar,n umeric,varchar, numeric,numeric ,numeric,numeri c
,numeric,numeri c,boolean,boole an,boolean,varc har,varchar,var char,numeric)
RETURNS void AS '
DECLARE
@DocAction ALIAS FOR $1;
-- 1 - Load Document
-- 2 - Update Header
-- 3 - New Document
-- 4 - Document Delete
@SessionID ALIAS FOR $2; -- Session ID
@LockID ALIAS FOR $3; -- Lock ID
@Lang ALIAS FOR $4; -- Language
@DocID ALIAS FOR $5; -- Material Parameter ID
@AltG ALIAS FOR $6; -- 1 kui valitakse Funtsionaalse
Grupeeringu alusel
@NoData ALIAS FOR $7; -- 1, Kui eii vC¤ljastata andmeid
@ProductUpd ALIAS FOR $8; -- 1, Kui avatakse korrigeerimisek s
tootekirjelduse alt

@StocCode ALIAS FOR $9; -- Ladu
@MainGroupCode ALIAS FOR $10; -- PeaGrupp
@SubGroupCode ALIAS FOR $11; -- AlaGrupp
@ExtraGroupCode ALIAS FOR $12; -- TC¤iendav Grupp
@AltMainGroupCo de ALIAS FOR $13; -- Funtsionnalne PeaGrupp
@AltSubGroupCod e ALIAS FOR $14; -- Funtsionnalne AlaGrupp
@AltExtraGroupC ode ALIAS FOR $15; -- Funtsionnalne TC¤iendav Grupp
@MatCode ALIAS FOR $16; -- Kood
@Suffix ALIAS FOR $17; -- Positsioon
@BarCode ALIAS FOR $18; -- Triipkood
@MatName ALIAS FOR $19; -- Nimetus
@MeasureUnit ALIAS FOR $20; -- MŨŨtC¼hik
@InPackage ALIAS FOR $21; -- Cœhikut Pakis
@CurrencyCode ALIAS FOR $22; -- Valuuta
@EtalonPrice ALIAS FOR $23; -- EtalonHind
@Discount ALIAS FOR $24; -- Soodustus
@NullPrice ALIAS FOR $25; -- NullHind
@NullPrice_VAT ALIAS FOR $26; -- NullHind KM-ga
@CostPlusPercen t ALIAS FOR $27; -- Juurdehindlus %
@VATPercent ALIAS FOR $28; -- KC¤ibemaksu %
@NotInPriceList ALIAS FOR $29; -- 1, Kui ei kuulu hinnakirja
@Closed ALIAS FOR $30; -- 1, Kui on Suletud
@Product ALIAS FOR $31; -- 1, Kui on Toode
@Warranty ALIAS FOR $32; -- Garantii tekst
@Info ALIAS FOR $33; -- Info
@MatDebit ALIAS FOR $34; -- Materjali Konto
@KASTIS ALIAS FOR $35; --,@KASTIS numeric(18,3) =NULL --
Cœhikut Kastis (Konteineris)
BEGIN

"Dennis Gearon" <ge*****@firese rve.net> wrote in message
news:3F******** ****@fireserve. net...
Ivar wrote:
I don't see why default is so small.

"Joe Conway" <ma**@joeconway .com> wrote in message
news:3F******* *******@joeconw ay.com...

Ivar wrote:
For my supprise I found that functions have 32 parameter limit.

Where to find more info about this limitation or similar limitations ?

I need at least 50, 100 would be ok.
See INDEX_MAX_KEYS defined in src/include/pg_config.h.in
(pg_config_ma nual.h in postgres 7.4). Change to 64 or whatever and
recompile. But note that you'll need to dump, initdb, and reload your
data. Also note that there are performance and disk usage tradeoffs --
search the mailing list archives from August 2002 for some test results
and discussion.

Joe
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

32 is small? I've never designed a function with more than 12-18, at teh
MOST, arguments.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 11 '05 #8

On Thu, 28 Aug 2003, Ivar wrote:
I don't see why default is so small.
Re-read Joe's response. There are performance and disk usage tradeoffs
for raising the limit. I'd suggest looking at the mailing list archives
for the discussion mentioned.
"Joe Conway" <ma**@joeconway .com> wrote in message
news:3F******** ******@joeconwa y.com...
Ivar wrote:
For my supprise I found that functions have 32 parameter limit.

Where to find more info about this limitation or similar limitations ?

I need at least 50, 100 would be ok.


See INDEX_MAX_KEYS defined in src/include/pg_config.h.in
(pg_config_manu al.h in postgres 7.4). Change to 64 or whatever and
recompile. But note that you'll need to dump, initdb, and reload your
data. Also note that there are performance and disk usage tradeoffs --
search the mailing list archives from August 2002 for some test results
and discussion.

Joe
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 11 '05 #9
It might be possible to use an array.

Ivar wrote:
It all depends what soft are you doing.

There is for example material card function.
It it designed so bad that it has more than 32 ars.
Why must split this function if behind UI I use it as single function for
adding updateing material ???

CREATE OR REPLACE FUNCTION
wpr_M_I_Materi alCard_Doc(int, varchar,varchar ,varchar,varcha r,boolean,boole an
,boolean,varch ar,varchar,varc har,varchar,var char,varchar,va rchar,varchar,v ar
char,varchar,v archar,varchar, numeric,varchar ,numeric,numeri c,numeric,numer ic
,numeric,numer ic,boolean,bool ean,boolean,var char,varchar,va rchar,numeric)
RETURNS void AS '
DECLARE
@DocAction ALIAS FOR $1;
-- 1 - Load Document
-- 2 - Update Header
-- 3 - New Document
-- 4 - Document Delete
@SessionID ALIAS FOR $2; -- Session ID
@LockID ALIAS FOR $3; -- Lock ID
@Lang ALIAS FOR $4; -- Language
@DocID ALIAS FOR $5; -- Material Parameter ID
@AltG ALIAS FOR $6; -- 1 kui valitakse Funtsionaalse
Grupeeringu alusel
@NoData ALIAS FOR $7; -- 1, Kui eii vC?ljastata andmeid
@ProductUpd ALIAS FOR $8; -- 1, Kui avatakse korrigeerimisek s
tootekirjeldus e alt

@StocCode ALIAS FOR $9; -- Ladu
@MainGroupCode ALIAS FOR $10; -- PeaGrupp
@SubGroupCode ALIAS FOR $11; -- AlaGrupp
@ExtraGroupCode ALIAS FOR $12; -- TC?iendav Grupp
@AltMainGroupCo de ALIAS FOR $13; -- Funtsionnalne PeaGrupp
@AltSubGroupCod e ALIAS FOR $14; -- Funtsionnalne AlaGrupp
@AltExtraGroupC ode ALIAS FOR $15; -- Funtsionnalne TC?iendav Grupp
@MatCode ALIAS FOR $16; -- Kood
@Suffix ALIAS FOR $17; -- Positsioon
@BarCode ALIAS FOR $18; -- Triipkood
@MatName ALIAS FOR $19; -- Nimetus
@MeasureUnit ALIAS FOR $20; -- MŨŨtC?hik
@InPackage ALIAS FOR $21; -- C?hikut Pakis
@CurrencyCode ALIAS FOR $22; -- Valuuta
@EtalonPrice ALIAS FOR $23; -- EtalonHind
@Discount ALIAS FOR $24; -- Soodustus
@NullPrice ALIAS FOR $25; -- NullHind
@NullPrice_VAT ALIAS FOR $26; -- NullHind KM-ga
@CostPlusPercen t ALIAS FOR $27; -- Juurdehindlus %
@VATPercent ALIAS FOR $28; -- KC?ibemaksu %
@NotInPriceList ALIAS FOR $29; -- 1, Kui ei kuulu hinnakirja
@Closed ALIAS FOR $30; -- 1, Kui on Suletud
@Product ALIAS FOR $31; -- 1, Kui on Toode
@Warranty ALIAS FOR $32; -- Garantii tekst
@Info ALIAS FOR $33; -- Info
@MatDebit ALIAS FOR $34; -- Materjali Konto
@KASTIS ALIAS FOR $35; --,@KASTIS numeric(18,3) =NULL --
C?hikut Kastis (Konteineris)
BEGIN

"Dennis Gearon" <ge*****@firese rve.net> wrote in message
news:3F******* *****@fireserve .net...

Ivar wrote:
I don't see why default is so small.

"Joe Conway" <ma**@joeconway .com> wrote in message
news:3F***** *********@joeco nway.com...


Ivar wrote:


>For my supprise I found that functions have 32 parameter limit.
>
>Where to find more info about this limitation or similar limitations ?
>
>I need at least 50, 100 would be ok.
>
>
>
>
See INDEX_MAX_KEYS defined in src/include/pg_config.h.in
(pg_config_ manual.h in postgres 7.4). Change to 64 or whatever and
recompile . But note that you'll need to dump, initdb, and reload your
data. Also note that there are performance and disk usage tradeoffs --
search the mailing list archives from August 2002 for some test results
and discussion.

Joe
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if

your

joining column's datatypes do not match



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


32 is small? I've never designed a function with more than 12-18, at teh
MOST, arguments.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #10

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

Similar topics

3
2881
by: Jim Newton | last post by:
hi all, i'm relatively new to python. I find it a pretty interesting language but also somewhat limiting compared to lisp. I notice that the language does provide a few lispy type nicities, but some very important ones seem to be missing. E.g., the multiple class inheritance is great, but there are no generic functions (at least that i...
6
1909
by: Ian Sparks | last post by:
I have a python file with a number of functions named with the form doX so : doTask1 doThing doOther The order these are executed in is important and I want them to be executed top-down. They all have the same parameter signature so I'd like to do : for name, func in vars(mymodule).items(): if not name.startswith("do") and...
0
2331
by: Anthony Baxter | last post by:
To go along with the 2.4a3 release, here's an updated version of the decorator PEP. It describes the state of decorators as they are in 2.4a3. PEP: 318 Title: Decorators for Functions and Methods Version: $Revision: 1.34 $ Last-Modified: $Date: 2004/09/03 09:32:50 $ Author: Kevin D. Smith, Jim Jewett, Skip Montanaro, Anthony Baxter
15
5528
by: Jerry He | last post by:
Hi, Is it possible to create a function that you can use without parenthesizing the arguments? for example, for def examine(str): ..... ..... Is there some way to define it so that I can call it like
2
3765
by: Bryan Olson | last post by:
The current Python standard library provides two cryptographic hash functions: MD5 and SHA-1 . The authors of MD5 originally stated: It is conjectured that it is computationally infeasible to produce two messages having the same message digest. That conjecture is false, as demonstrated by Wang, Feng, Lai and Yu in 2004 . Just recently,...
25
2550
by: Russell | last post by:
I want my code to be Python 3000 compliant, and hear that lambda is being eliminated. The problem is that I want to partially bind an existing function with a value "foo" that isn't known until run-time: someobject.newfunc = lambda x: f(foo, x) The reason a nested function doesn't work for this is that it is, well, dynamic. I don't know...
3
2091
by: John Shell | last post by:
Hello, all. The following code results in a C2666 error (2 overloads have similar conversions). class FSVec2D { public: FSVec2D() { // code omitted }
12
4074
by: Andy Terrel | last post by:
Okay does anyone know how to decorate class member functions? The following code gives me an error: Traceback (most recent call last): File "decorators2.py", line 33, in <module> s.update() File "decorators2.py", line 13, in __call__ retval = self.fn.__call__(*args,**kws) TypeError: update() takes exactly 1 argument (0 given)
9
3975
by: Gabriel Rossetti | last post by:
Hello, I can't get getattr() to return nested functions, I tried this : .... def titi(): .... pass .... f = getattr(toto, "titi") .... print str(f) .... Traceback (most recent call last):
0
7583
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7783
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. ...
0
8019
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...
0
7873
tracyyun
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...
0
6127
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5424
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...
0
3546
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...
0
3534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1115
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.