[Patches] [ python-Patches-798534 ] Windows os.popen needlessly gets a reference to tuple ()

SourceForge.net noreply at sourceforge.net
Mon Sep 1 06:48:12 EDT 2003


Patches item #798534, was opened at 2003-09-01 07:48
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=798534&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Gaul (gaul)
Assigned to: Nobody/Anonymous (nobody)
Summary: Windows os.popen needlessly gets a reference to tuple ()

Initial Comment:
Windows os.popen creates a zero length tuple and does
not use or destroy it.  Warning: attached patch has not
been tested!  I do not have a Windows development
environment.

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for
more information.
>>> import os, sys
>>> sys.getrefcount(())
440
>>> p = os.popen('dir')
>>> sys.getrefcount(())
441
>>> p = os.popen('dir')
>>> sys.getrefcount(())
442

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=798534&group_id=5470



More information about the Patches mailing list