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.

Author dangyogi
Recipients dangyogi
Date 2017-03-25.13:16:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za>
In-reply-to
Content
Doing a copy on a staticmethod breaks it:

Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from copy import copy
>>> def foo(): pass
... 
>>> class bar: pass
... 
>>> bar.x = staticmethod(foo)
>>> bar.x.__name__
'foo'
>>> bar.y = copy(staticmethod(foo))
>>> bar.y.__name__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: uninitialized staticmethod object
History
Date User Action Args
2017-03-25 13:16:44dangyogisetrecipients: + dangyogi
2017-03-25 13:16:44dangyogisetmessageid: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za>
2017-03-25 13:16:44dangyogilinkissue29902 messages
2017-03-25 13:16:44dangyogicreate