[Python-ideas] Add citation() to site.py

Steven D'Aprano steve at pearwood.info
Thu Mar 17 19:33:02 EDT 2016


On Thu, Mar 17, 2016 at 02:51:37PM -0700, Guido van Rossum wrote:
> I replied from my cell phone but it bounced (again :-( ). I wrote:
> 
> """
> I think this should be in the docs, not in the code. (The reason to
> have copyright() in the code is purely legalistic.)
> """

If this is in the code, a possible future enhancement would be for it to 
take an optional module or module name and query that module for its 
preferred citation. That's what R does.


> But I would be much more interested in hearing what the citation text
> should be before discussing how to add it to the code. (I still think
> adding it to the code isn't very helpful -- we can't add this to the
> older versions of code that people are likely to be using.)

True, but some day -- hopefully not that far away -- 3.6 will be the 
"older version" that people are likely to be using.


My suggested citation format is based heavily on that used by R. It 
could be implemented something like this:

year = platform.python_build()[1].split()[2]
vers = platform.python_version()
_CITE = """\
To cite Python in publications, please use:

  Python Core Team ({}). Python {}: A dynamic, open
  source programming language. Python Software Foundation.
  URL https://www.python.org/.

""".format(year, vers)


which would end up looking like this:

To cite Python in publications, please use:

  Python Core Team (2015). Python 3.6.0a0: A dynamic, open
  source programming language. Python Software Foundation.
  URL https://www.python.org/.


I'm not married to any particular wording or preferred format.



-- 
Steve


More information about the Python-ideas mailing list