Comment #41 on issue 1757 by ronan.l...@gmail.com: coding style
http://code.google.com/p/sympy/issues/detail?id=1757

'self' isn't just any function argument, it has a (purely conventional) specific meaning. Rebinding it breaks the implicit promises carried by the name (e.g. the object named 'self' could then be an instance of a completely different class than the one where the method is defined) which causes an unnecessary cognitive burden and increases the risk of bad design decisions and bugs. The example with 'self += 1' is particularly bad since you have to think carefully whether it's just rebinding the name or altering the 'self' object.

In any case, this should be considered a guideline that can be broken if, but only if, there is a good reason to do so.

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

Reply via email to