Is it possible to attach an __author__
attribute to a specific class or method within a module? I am only familiar with the syntax of giving authorial credit for an entire module, but the package I am managing has multiple authors working on different pieces of the same (large) module.
Asked
Active
Viewed 828 times
0

jonrsharpe
- 115,751
- 26
- 228
- 437

aph
- 1,765
- 2
- 19
- 34
-
1Why not `import` those different pieces from sub-modules? Alternatively, make `__author__` a string containing all relevant authors (see e.g. http://stackoverflow.com/q/9999829/3001761). There's no reason you *couldn't* assign the `__author__` attribute of a class or function, but I don't think it would be *used* by anything. – jonrsharpe Jan 20 '15 at 14:31
1 Answers
0
I personally think having __author__
on both module or class level is an unnecessary noise:
- you have a version control system that already has this kind of information
if you want to explicitly list the authors - put them into special
AUTHORS
(orauthors.txt
, orcontributors.txt
) file in the project root, see:- or list the authors in the
setup.py
(if you are making a valid python package)
Related topic with multiple good points about the "authors":