Hi Ram, On 05/03/2011 01:25 PM, cool-RR wrote: > In my project I made an `abstract_static_method` class: > > https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/garlicsim/general_misc/abc_tools.py#L7 > > <https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/garlicsim/general_misc/abc_tools.py#L7>A > similar one has been made in Python 3.2: > > http://hg.python.org/cpython/file/default/Lib/abc.py#l48 > > > <http://hg.python.org/cpython/file/default/Lib/abc.py#l48>In Pypy this > currently cannot be done, because if you subclass `staticmethod` into > `abstractstaticmethod`, any instances will have a class > of `staticmethod` instead of `abstractstaticmethod`: > > >>>> class A(staticmethod): > .... pass > .... > >>>> def f(): > .... pass > .... > >>>> a = A(f) > >>>> a > <staticmethod object at 0x00f2ade0> > >>>> type(a) > <type 'staticmethod'> > > > What can be done? I want to have `abstract_static_method` in my code.
This is a bug in PyPy, I fixed it in the repo, tomorrow you can use a fresh nightly build from here: http://buildbot.pypy.org/nightly/trunk/ Carl Friedrich _______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev