Éric Araujo <mer...@netwok.org> added the comment:

> What does @ mean here? If there's some meaning, the next question is, why doc 
> for staticmethod()
> (and classmethod() in the same page) does not have it?

@ means that the function is meant to be used as a decorator (the markup looks 
like the actual code).

staticmethod and classmethod are older than the decorator syntax, which is 
older than the special sphinx markup for decorators (they used to just use the 
function markup).

For unittest.mock.patch, its result can be used as a decorator or as a context 
manager, so the current markup (no @) makes sense.

If you want to update staticmethod and classmethod to use the decorator markup, 
please send a pull request!  (more info in the devguide)

----------
nosy: +merwok

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31567>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to