From bd39cf0ae3192608c3d7e068780e5110b1e20160 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Mon, 22 Jan 2001 20:24:56 +0000 Subject: [PATCH] Remove the .clear() method; add a link to the patch on SF. --- pep-0205.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pep-0205.txt b/pep-0205.txt index 421ef5ac0..9a066ac89 100644 --- a/pep-0205.txt +++ b/pep-0205.txt @@ -5,7 +5,7 @@ Author: Fred L. Drake, Jr. Python-Version: 2.1 Status: Incomplete Type: Standards Track -Post-History: +Post-History: 11 January 2001 Motivation @@ -81,14 +81,11 @@ Proposed Solution weakref.mapping() will create a "weak dictionary". A weak reference object will allow access to the referenced object - if it hasn't been collected, allows application code to either - "clear" the weak reference and the associated callback, and to - determine if the object still exists in memory. These operations - are accessed via the .get(), .clear(), and .islive() methods. If - the object has been collected, .get() will return None and - islive() will return false; calling .clear() will produce the same - result, and is allowed to occur repeatedly. Weak references are - not hashable. + if it hasn't been collected and to determine if the object still + exists in memory. These operations are accessed via the .get() + and .islive() methods. If the object has been collected, .get() + will return None and islive() will return false. Weak references + are not hashable. A weak dictionary maps arbitrary keys to values, but does not own a reference to the values. When the values are finalized, the @@ -142,6 +139,10 @@ Implementation Strategy dictionaries. Whether it should include strings, buffers, lists, files, or sockets is debatable. + There is a preliminary patch on SourceForge: + + http://sourceforge.net/patch/?func=detailpatch&patch_id=103203&group_id=5470 + Possible Applications