chriscz / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Support for @staticmethod #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The attached patch implements just enough to get @staticmethod decorator
working. Namely, the following code compiles:

class C:
    @staticmethod
    def id(x):
        return x
print C.id(1)

Original issue reported on code.google.com by sanxiyn on 6 Aug 2008 at 8:28

Attachments:

GoogleCodeExporter commented 9 years ago
thanks for the patch! I will have a look at it, but unfortunately I'm currently 
away
on vacation, so I can't say for sure when this will be.. 

Original comment by mark.duf...@gmail.com on 15 Aug 2008 at 1:25

GoogleCodeExporter commented 9 years ago
okay, this looks pretty good. I had to modify (actually, simplify) some things 
so
that no variable called 'staticmethod' is created; also, it's easy to support
multiple decorators.. :-)

thanks a lot for the patch!

Original comment by mark.duf...@gmail.com on 19 Aug 2008 at 5:01

GoogleCodeExporter commented 9 years ago
I also added @property to SVN. thanks again. 

Original comment by mark.duf...@gmail.com on 16 Sep 2008 at 9:38