#1872 closed (invalid)
Documentation: module level methods
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation on module level methods has disappeared. Pre-MR this was _module_methods. I think post-MR we can used @staticmethod and @classmethod. It would be nice if this was explicity stated in the docs. This is different from Manager table wide methods - I think.
Change History (3)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing for the reason outlined by lukeplant in the previous comment.
comment:3 by , 19 years ago
Type: | defect |
---|
Note:
See TracTickets
for help on using tickets.
You can use @staticmethod, @classmethod and plain old methods, as well as module level functions. The choice between module level functions and @staticmethods is mainly a matter of style. I personally think it shouldn't be stated anywhere in the documentation -- it works exactly like you would expect it to in Python, and for those who are not aware of the bad old days, this would just be pointing out the obvious. If it's not in the RemovingTheMagic wiki page, maybe you could add it there.