copyright in docstr? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: General (https://python-forum.io/forum-1.html) +--- Forum: News and Discussions (https://python-forum.io/forum-31.html) +--- Thread: copyright in docstr? (/thread-33459.html) |
copyright in docstr? - Skaperen - Apr-26-2021 is it safe and appropriate to put a copyright notice and license terms in the docstr after a line describing the basic purpose of the code? for example... def int_to_deciplex(value=0): """Convert an int value to a string in deciplex notation. Copyright © 2021, by Phil D. Howard - all other rights reserved Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. The author may be contacted by decoding the number 11054987560151472272755686915985840251291393453694611309 (provu igi la numeron al duuma) """ r = [str(value%1024)] for s in 'kmgtpezyxwv' value //= 1024 if not value: break if value%1024: r[:0] = [str(value%1024)+s] return ''.join(r) RE: copyright in docstr? - snippsat - Apr-26-2021 (Apr-26-2021, 10:38 PM)Skaperen Wrote: is it safe and appropriate to put a copyright notice and license terms in the docstr after a line describing the basic purpose of the code?No,if have licensing or legal disclaimers info,it goes into a separate file at root project level. People should be able to find LICENSE file without looking for it in source code. LICENSE.txt, A sample Python project. RE: copyright in docstr? - DeaD_EyE - Apr-27-2021 The modern way (SPDX): https://reuse.software/faq/ RE: copyright in docstr? - Skaperen - Apr-30-2021 everything is in one file for each subproject and many have different licensing. every file gets processed as code. putting the copyright and license in the code solves many issues. i'm trying decide whether to put it in comments or string literals. RE: copyright in docstr? - Skaperen - Apr-30-2021 (Apr-27-2021, 02:47 PM)DeaD_EyE Wrote: The modern way (SPDX): https://reuse.software/faq/ that abbreviation makes me think of SPQR SPDX looks good. this project can be published in a way that works (as far as i can see) with SPDX. but it includes a means to transfer a single (per request) source code file. maybe SPDX header is good enough in that case. but the LICENSES/ directory and anything else is not transferred in that request. what is transferred needs to have legal protection entirely within the file. RE: copyright in docstr? - Gribouillis - Apr-30-2021 The most interesting part of it is the reuse tool to automate the process of keeping a project up to date with respect to licensing. |