On Tue, Jun 30, 2020 at 2:16 PM Ken Dreyer <ktdreyer(a)ktdreyer.com> wrote:
Someone was asking me recently why hub/kojihub.py has a convention
like:
listChannels = staticmethod(list_channels)
As Tomas suggests, this code predates python 2.4.
Is it fine to just remove this and use the @staticmethod decorator
on
all the "public API" methods everywhere?
In this case, and many others, it is not that simple. ListChannels is
defined inside the RootExports class, but list_channels is a module level
function. You can't just add the decorator to it.
This is just a more compact and efficient way of adding an internal
function to the exports when we don't need to add any wrapper code.
- Ken
_______________________________________________
koji-devel mailing list -- koji-devel(a)lists.fedorahosted.org
To unsubscribe send an email to koji-devel-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/koji-devel@lists.fedorahoste...