Re: Python 3.1 support

James William Pye <lists@jwp.name>

From: James Pye <lists@jwp.name>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers@postgresql.org
Date: 2009-11-20T08:20:04Z
Lists: pgsql-hackers
On Nov 20, 2009, at 12:02 AM, Peter Eisentraut wrote:
> Is there any precedent for the sort of behavior that you are
> implementing, that is, automatic sharing of variables between
> independent executions of the same source container?

import foo

# bar is a regular, def'd function.
foo.bar()

...

# even in another thread, doesn't matter..
foo.bar()


In either call, foo.bar()'s globals() is the same dictionary object(the foo module's dictionary).

A plpython3 function *is* a Python module.