homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 2022年04月11日 14:57 by admin. 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) (Python triager) 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
2022年04月11日 14:57:26adminsetgithub: 58259
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

AltStyle によって変換されたページ (->オリジナル) /