Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#1872 closed (invalid)

Documentation: module level methods

Reported by: bnomis@… 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: UI/UX:


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 Changed 10 years ago by lukeplant

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.

comment:2 Changed 10 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed

Closing for the reason outlined by lukeplant in the previous comment.

comment:3 Changed 9 years ago by Main

  • Type defect deleted
Note: See TracTickets for help on using tickets.
Back to Top