On Mar 10, 4:39 pm, Sam <[EMAIL PROTECTED]> wrote:
> Hello
>
> I would like to implement some kind of comparator, that could be
> called as instance method, or static method. Here is a trivial pseudo
> code of what I would like to execute
>
> >> class MyClass:
>
> ...def __init__(self, value):
> Did you try that it doesn't work? because it should. Whenever you do
>
No... -_- I kept on trying things @staticmethod.
Thanks for your hint, it works fine!
Sam
--
http://mail.python.org/mailman/listinfo/python-list
Sam wrote:
> Hello
>
> I would like to implement some kind of comparator, that could be
> called as instance method, or static method. Here is a trivial pseudo
> code of what I would like to execute
>
>>> class MyClass:
> ...def __init__(self, value):
> ...self.value = value
> ...