Merge lp://staging/~javier.collado/checkbox-core/staticmethods into lp://staging/checkbox-core

Proposed by Javier Collado
Status: Merged
Merged at revision: 15
Proposed branch: lp://staging/~javier.collado/checkbox-core/staticmethods
Merge into: lp://staging/checkbox-core
Diff against target: 112 lines (+18/-18)
4 files modified
checkbox/journal/multi.py (+8/-8)
checkbox/message/signal.py (+2/-2)
checkbox/process/args.py (+6/-6)
checkbox/process/env.py (+2/-2)
To merge this branch: bzr merge lp://staging/~javier.collado/checkbox-core/staticmethods
Reviewer Review Type Date Requested Status
Marc Tardif Approve
Review via email: mp+103279@code.staging.launchpad.net

Description of the change

Those class methods that didn't actually used the cls parameter, have been changed to be static methods.

To post a comment you must log in.
Revision history for this message
Marc Tardif (cr3) wrote :

This is definately in the right direction where I would eventually like to see class methods replaced with static methods, and static methods replaced by functions. This would be consistent with what Guido said [1]: Ironically, there are now no known uses for class methods in the Python distribution (other than in the test suite). I might even get rid of classmethod in a future release if no good use for it can be found!

However, these changes should not be done systematically; if a class method doesn't happen to use the class argument, that doesn't necessarily mean it makes sense to make it a function. So, some class methods might make more sense to be expressed as just methods whereas others as functions.

1. http://www.python.org/download/releases/2.2/descrintro/

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: