<div dir="ltr">In my project I made an `abstract_static_method` class:<div><br></div><div><a href="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></div>
<div><br></div><div><a href="https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/garlicsim/general_misc/abc_tools.py#L7"></a>A similar one has been made in Python 3.2:</div><div><br></div><div><a href="http://hg.python.org/cpython/file/default/Lib/abc.py#l48">http://hg.python.org/cpython/file/default/Lib/abc.py#l48</a></div>
<div><br></div><div><br></div><div><a href="http://hg.python.org/cpython/file/default/Lib/abc.py#l48"></a>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`:</div>
<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>&gt;&gt;&gt;&gt; class A(staticmethod):</div></div><div><div>....   pass</div></div><div><div>....</div>
</div><div><div>&gt;&gt;&gt;&gt; def f():</div></div><div><div>....   pass</div></div><div><div>....</div></div><div><div>&gt;&gt;&gt;&gt; a = A(f)</div></div><div><div>&gt;&gt;&gt;&gt; a</div></div><div><div>&lt;staticmethod object at 0x00f2ade0&gt;</div>
</div><div><div>&gt;&gt;&gt;&gt; type(a)</div></div><div><div>&lt;type &#39;staticmethod&#39;&gt;</div></div></blockquote><div><br></div><div>What can be done? I want to have `abstract_static_method` in my code.<br>
</div><div><br></div><div><br></div><div>Thanks,</div><div>Ram.</div></div>