[Patches] [ python-Patches-1004703 ] Make func_name writable
SourceForge.net
noreply at sourceforge.net
Fri Aug 6 22:44:18 CEST 2004
Patches item #1004703, was opened at 2004-08-06 18:06
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1004703&group_id=5470
Category: Core (C code)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Hudson (mwh)
Assigned to: Nobody/Anonymous (nobody)
Summary: Make func_name writable
Initial Comment:
This was pretty easy: just copypasteandchange the code
for func_code :-) I only allow func_name (or __name__)
to be set to a string.
Adds some simple tests.
I've corrected the one place in the docs that seems to
claim func_name is read only, but the docs for which
function attributes are or aren't read-only don't seem
to be especially accurate already.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2004-08-06 22:44
Message:
Logged In: YES
user_id=21627
Should we require that the new function name is a valid
identifier? If not, is an empty string an acceptable
function name? Also, are string subtypes allowed?
There should be \versionchanged in the documentation.
----------------------------------------------------------------------
Comment By: Skip Montanaro (montanaro)
Date: 2004-08-06 20:18
Message:
Logged In: YES
user_id=44345
Looks good. Less important in the current context, but for
any of the
attributes which are writable should there be PyFunction_Set
methods
available to help enforce desired behavior (not allowing
non-string
objects for function names for example)?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1004703&group_id=5470
More information about the Patches
mailing list