<div dir="ltr">Cool. Is there gonna be a 1.5.1 release with stuff like this?<br><br><div class="gmail_quote">On Tue, May 3, 2011 at 1:36 PM, Carl Friedrich Bolz <span dir="ltr"><<a href="mailto:cfbolz@gmx.de">cfbolz@gmx.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Ram,<br>
<div><div></div><div class="h5"><br>
On 05/03/2011 01:25 PM, cool-RR wrote:<br>
> In my project I made an `abstract_static_method` class:<br>
><br>
> <a href="https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/garlicsim/general_misc/abc_tools.py#L7" target="_blank">https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/garlicsim/general_misc/abc_tools.py#L7</a><br>
><br>
> <<a href="https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/garlicsim/general_misc/abc_tools.py#L7" target="_blank">https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/garlicsim/general_misc/abc_tools.py#L7</a>>A<br>
> similar one has been made in Python 3.2:<br>
><br>
> <a href="http://hg.python.org/cpython/file/default/Lib/abc.py#l48" target="_blank">http://hg.python.org/cpython/file/default/Lib/abc.py#l48</a><br>
><br>
><br>
> <<a href="http://hg.python.org/cpython/file/default/Lib/abc.py#l48" target="_blank">http://hg.python.org/cpython/file/default/Lib/abc.py#l48</a>>In Pypy this<br>
> currently cannot be done, because if you subclass `staticmethod` into<br>
> `abstractstaticmethod`, any instances will have a class<br>
> of `staticmethod` instead of `abstractstaticmethod`:<br>
><br>
> >>>> class A(staticmethod):<br>
> .... pass<br>
> ....<br>
> >>>> def f():<br>
> .... pass<br>
> ....<br>
> >>>> a = A(f)<br>
> >>>> a<br>
> <staticmethod object at 0x00f2ade0><br>
> >>>> type(a)<br>
> <type 'staticmethod'><br>
><br>
><br>
> What can be done? I want to have `abstract_static_method` in my code.<br>
<br>
<br>
</div></div>This is a bug in PyPy, I fixed it in the repo, tomorrow you can use a<br>
fresh nightly build from here:<br>
<br>
<a href="http://buildbot.pypy.org/nightly/trunk/" target="_blank">http://buildbot.pypy.org/nightly/trunk/</a><br>
<br>
Carl Friedrich<br>
_______________________________________________<br>
<a href="mailto:pypy-dev@codespeak.net">pypy-dev@codespeak.net</a><br>
<a href="http://codespeak.net/mailman/listinfo/pypy-dev" target="_blank">http://codespeak.net/mailman/listinfo/pypy-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br>Ram Rachum<br>
</div>