classification
Title: Cannot set attributes on staticmethod
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, alex, benjamin.peterson, daniel.urban, gvanrossum, python-dev
Priority: normal Keywords:

Created on 2012-02-18 17:45 by alex, last changed 2012-02-19 16:42 by benjamin.peterson. This issue is now closed.

Messages (4)
msg153649 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2012-02-18 17:45
This is inconsistant with regular functions, which unfortunately prevents them from being used interchangeably.
msg153670 - (view) Author: Roundup Robot (python-dev) Date: 2012-02-19 06:14
New changeset f46deae68e34 by Benjamin Peterson in branch 'default':
allow arbitrary attributes on classmethod and staticmethod (closes #14051)
http://hg.python.org/cpython/rev/f46deae68e34
msg153706 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2012-02-19 15:49
Wouldn't it make more sense to somehow share the dict with the underlying function?
msg153710 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2012-02-19 16:42
You can wrap anything with staticmethod, so it might not have a __dict__.
History
Date User Action Args
2012-02-19 16:42:45benjamin.petersonsetmessages: + msg153710
2012-02-19 15:49:50gvanrossumsetnosy: + gvanrossum
messages: + msg153706
2012-02-19 06:14:40python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg153670

resolution: fixed
stage: needs patch -> resolved
2012-02-18 21:42:26daniel.urbansetnosy: + daniel.urban
2012-02-18 19:50:27pitrousetversions: + Python 3.3
nosy: + benjamin.peterson

components: + Interpreter Core
type: enhancement
stage: needs patch
2012-02-18 18:25:45Arfreversetnosy: + Arfrever
2012-02-18 17:45:28alexcreate