[mod_python] Passing data across handlers

Gregory Trubetskoy grisha at modpython.org
Tue Sep 12 11:46:10 EST 2000


Yes, reference counting will be one problem with this.... I think a better
alternative would be to do it the way you suggested, but there would be
one dictionary per interpreter. So you won't be able to pass objects
between interpreters, *and* you don't have to worry about reference
counting.

On Tue, 12 Sep 2000, Rich Salz wrote:

> > Here is a suggestion - if I provided a way to store a pointer to a Python
> > object in notes - would that solve your problem? You create the object,
> > then call some function that returns a string that you can store in
> > notes.
> 
> Yes.  That's what I was thinking of in my first note (the "%p" being the
> ANSI C way to make stringify a pointer -- atol is a hack).   Not sure
> what the inferences are for referencing counting -- will I explicitly
> call "del" on what I get back?
> 
> (Wouldn't it have been nice if Py_INCREF returned its input param? :)
> 
> Is the request_rec notes field mapped to a python list?  Could/should it
> be?
> 
> > Try that with mod_perl.
> 
> :)  First I have to understand it.
> 




More information about the Mod_python mailing list