[Python-Dev] The Trick

Kevin Jacobs jacobs at penguin.theopalgroup.com
Sat Oct 18 14:00:28 EDT 2003


On Sat, 18 Oct 2003, Guido van Rossum wrote:
> I don't like the trick of avoiding the copy if the refcount is one;
> AFAIK it can't be done in Jython.

There is also a problem with the strategy if if gets called by a C
extension.  It is perfectly feasible for a C extension to hold the only
reference to an object, call the copying sort (directly or indirectly), and
then be very surprised that the copy did not take place.

-Kevin

-- 
--
Kevin Jacobs
The OPAL Group - Enterprise Systems Architect
Voice: (440) 871-6725 x 19         E-mail: jacobs at theopalgroup.com
Fax:   (440) 871-6722              WWW:    http://www.theopalgroup.com/




More information about the Python-Dev mailing list