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.


Thanks,
Ram.
_______________________________________________
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to