7stud <[EMAIL PROTECTED]> wrote:
...
> I'm using python 2.3.5.
>
> On Mar 29, 9:34 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
> > Simplest way:
> >
> > class smethod(object):
> > def __init__(self, f): self.f=f
> > def __call__(self, *a, **k): return self.f(*a, **k)
> >
> > Alex
>
> Inte
Hi,
Thanks for the responses.
On Mar 28, 4:01 pm, "Michael Spencer" <[EMAIL PROTECTED]> wrote:
> "7stud" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]> Hi,
>
> > Can someone show me how to manually implement staticmethod()? Here is
> > my latest attempt:
> >
>
7stud <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can someone show me how to manually implement staticmethod()? Here is
Simplest way:
class smethod(object):
def __init__(self, f): self.f=f
def __call__(self, *a, **k): return self.f(*a, **k)
Alex
--
http://mail.python.org/mailman/listinfo/pytho
"7stud" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Can someone show me how to manually implement staticmethod()? Here is
> my latest attempt:
>
Raymond Hettinger can:
http://users.rcn.com/python/download/Descriptor.htm#static-methods-and-class-methods
Hi,
Can someone show me how to manually implement staticmethod()? Here is
my latest attempt:
def smethod(func):
def newFunc():
pass
def newGet():
print "new get"
newFunc.__get__ = newGet
return newFunc
class Tes