Urgent: DCOracle2 + stored procedure parameters

Gerhard Häring gerhard.haering at opus-gmbh.net
Fri Aug 30 12:06:55 EDT 2002


Ruslan Spivak wrote:
> Hello python-list users,
> 
> Could anybody explain me the following:
> 
> I need to pass to stored procedure about 40 parameters - ugly,
> is it possible to pass a record or similar from python to stored
> procedure (DCOracle2)

I'm not very experienced with DCOracle2, I'm currently using it like this,
with named parameters:

    cursor.callproc("someproc", PN_PROJ_ID=42)

So if you already have a dictionary that maps your parameter names to the
values you want to pass to the SP, you could use this form:


    parms = {"PN_PROJ_ID": 42, "PN_FOOBAR": "baz"}
    cursor.callproc("someproc", **parms)

Now I have a question - how are these forms of argument expansion (*args,
**kwargs) called in Python?



More information about the Python-list mailing list