Thank you, Tom, Mateusz, and Aaron!  Apparently, my own understating
of these two decorators was quite all right.  The functions I wrote
are really independent of the class and of the instance, but they do
belong logically to the class, because they eventually serve to
produce the final result the class holds and make little sense
somewhere else.

On Tue, Aug 28, 2012 at 7:17 PM, Tom Bachmann <[email protected]> wrote:
>
> I'm afraid I cannot find anything real either, so maybe it's not really
> true. I remember this from a talk by guido I watched a while ago.
>
> Some vague support of my memory:
>
> http://mail.python.org/pipermail/tutor/2010-September/078542.html
>
> http://www.peterbe.com/plog/newfound-love-of-staticmethod [first comment]
>
> http://stackoverflow.com/questions/136097/what-is-the-difference-between-staticmethod-and-classmethod-in-python

Well, that first comment under the post linked to by the second link
sounds rather solid.  I have a very vague apprehension of why static
methods could be bad, but, on the other hand, a lot of code uses them.

Tom, do you think I should rewrite my code to use @classmethod instead
of @staticmethod?  I really don't have a strong opinion on this since
I'm not a Python expert, and rewriting the methods should be pretty
easy.

Sergiu

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to