Opened 11 years ago

Closed 11 years ago

Last modified 11 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:

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 Changed 11 years ago by Luke Plant

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 11 years ago by Adrian Holovaty

Resolution: invalid
Status: newclosed

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

comment:3 Changed 11 years ago by Main

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