What is the standard way of writing "copyright information" in python code? Should it be inside docstring or in block comments? I could not find it in PEPs.
copyright() is a Python builtin class. You can CTRL + click on the function name in Pycharm so it will lead you to the actual source definition, which should belong to your standard python installation.
Insert copyright text into files To insert the text into a single file, open it in the editor, press Alt+Insert , and select Copyright from the popup.
# Copyright: \xa9 2008 etc.
Are there copyright restrictions on the use of Python? ¶ You can do anything you want with the source, as long as you leave the copyrights in and display those copyrights in any documentation about Python that you produce.
Some projects use module variables like __license__
, as in:
__author__ = "Software Authors Name" __copyright__ = "Copyright (C) 2004 Author Name" __license__ = "Public Domain" __version__ = "1.0"
Seems like a pretty clean solution to me (unless you overdo it and dump epic texts into these variables), but only __version__
seems to be in widespread use, as it is mentioned in PEP 8.
# Comment in the beginning of the file
At least python built-in modules do this. (found out by doing grep 'Copyright' /usr/lib64/python2.4/*.py
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With