Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brOie-0000WX-PG for pgsql-sql@arkaria.postgresql.org; Tue, 04 Oct 2016 12:21:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1brOid-0000kh-S6 for pgsql-sql@arkaria.postgresql.org; Tue, 04 Oct 2016 12:21:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1brOhd-00083g-Om for pgsql-sql@postgresql.org; Tue, 04 Oct 2016 12:20:09 +0000 Received: from mxout1.rambler.ru ([81.19.78.100]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brOha-0005P7-Bs for pgsql-sql@postgresql.org; Tue, 04 Oct 2016 12:20:08 +0000 Received: from saddam1.rambler.ru (saddam1.rambler.ru [10.32.16.1]) by mxout1.rambler.ru (Postfix) with ESMTP id E8B11C2C0D3 for ; Tue, 4 Oct 2016 15:20:02 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rambler.ru; s=mail; t=1475583603; bh=FxAzCUBADRZsZCjemLMLQbGt2HYVrqLkUVfLxAgiShA=; h=From:To:Reply-To:Subject:Date; b=mr6mlNSa6NZC/k0DTY0llYLv0y7yNYbDUxOF/tX+lLjgjjUZV83XthLmIYsWTR5Fw GXaA3FikpugnPTAmw68AfKVIxRphUZJAxN0SiGJTbkNnoFHYQcOq6hD2PR2VRDxEhS 5qdVQ7qaSTcypeehMkEM3rzRh5qz6Y5HeClpUn+Y= Received: from localhost.localdomain (localhost [127.0.0.1]) by saddam1.rambler.ru (Postfix) with ESMTP id BF19842AC63 for ; Tue, 4 Oct 2016 15:20:02 +0300 (MSK) Received: from [193.19.168.163] by mail.rambler.ru with HTTP; Tue, 4 Oct 2016 15:20:02 +0300 From: "Andrey Avakimov" To: "Pgsql Sql" Reply-To: "Andrey Avakimov" Subject: PLPython and named arguments Date: Tue, 4 Oct 2016 15:20:02 +0300 Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary="_----------=_1475583602244207" Message-Id: <1475583602.246825.24420.25624@mail.rambler.ru> MIME-Version: 1.0 X-Mailer: Rambler WebMail, http://mail.rambler.ru/ X-Rambler-User: aquarius1993@rambler.ru/193.19.168.163 X-Pg-Spam-Score: -4.6 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org This is a multi-part message in MIME format. --_----------=_1475583602244207 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; format="flowed" Hello My question is about plpython behavior. In some cases procedure ignores nam= ed arguments and raises an error like: UnboundLocalError: local variable 'arg_from' referenced before assignment This can be solved by using such code: arg_from, arg_to =3D args But the reasons of such behavior are still unclear. Does anyone faced this thing? I will gladly provide any further information if needed. Best Regards, Andrew --_----------=_1475583602244207 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

Hello

My question is abo= ut plpython behavior. In some cases procedure ignores named arguments and r= aises an error like:

UnboundLocalError:= local variable 'arg_from' referenced before assignment

This can be solved= by using such code:

arg_from, arg_to = =3D args

But the reasons of= such behavior are still unclear.

Does anyone faced = this thing?

I will gladly prov= ide any further information if needed.

Best Regards,
Andrew=

= --_----------=_1475583602244207--