Mark this PEP as Final, as it is now in Python 2.1. Any future

elaborations (e.g. as described in the retained "Future Directions"
section), must be proposed in a new PEP.
This commit is contained in:
Barry Warsaw 2001-03-28 20:24:34 +00:00
parent eed471f2b8
commit addf2b8692
1 changed files with 16 additions and 16 deletions

View File

@ -2,10 +2,10 @@ PEP: 232
Title: Function Attributes
Version: $Revision$
Author: barry@digicool.com (Barry A. Warsaw)
Status: Draft
Status: Final
Type: Standards Track
Created: 02-Dec-2000
Python-Version: 2.1 / 2.2
Python-Version: 2.1
Post-History: 20-Feb-2001
@ -96,10 +96,15 @@ Other Uses
Future Directions
- A previous version of this PEP (and the accompanying
implementation) allowed for both setter and getter of attributes
on unbound methods, and only getter on bound methods. A number
of problems were discovered with this policy.
Here are a number of future directions to consider. Any adoption
of these ideas would require a new PEP, which referenced this one,
and would have to be targeted at a Python version subsequent to
the 2.1 release.
- A previous version of this PEP allowed for both setter and
getter of attributes on unbound methods, and only getter on
bound methods. A number of problems were discovered with this
policy.
Because method attributes were stored in the underlying
function, this caused several potentially surprising results:
@ -128,7 +133,7 @@ Future Directions
attributes on either -- both return the attribute value on the
underlying function object.
The proposal for Python 2.2 is to implement setting (bound or
A future PEP might propose to implement setting (bound or
unbound) method attributes by setting attributes on the instance
or class, using special naming conventions. I.e.
@ -180,7 +185,8 @@ Future Directions
pass
The BDFL is currently against any such special syntactic support
for setting arbitrary function attributes.
for setting arbitrary function attributes. Any syntax proposals
would have to be outlined in new PEPs.
Dissenting Opinion
@ -217,14 +223,8 @@ Dissenting Opinion
Reference Implementation
The reference implementation is available on SourceForge as a
patch against the Python CVS tree (patch #103123). This patch
doesn't include the regrtest module and output file. Those are
available upon request.
http://sourceforge.net/patch/?func=detailpatch&patch_id=103123&group_id=5470
This patch has been applied and will become part of Python 2.1.
This PEP has been accepted and the implementation has been
integrated into Python 2.1.
References