27

In an academic paper, a colleague and I wrote that we "used Python (v3.8.8)" to perform a certain calculation.

The copy editor has asked us to provide the company name and location to complete the citation as "used Python (v3.8.8, __, __)."

We got a similar request for the Python scikit-learn package and the open-source audio editor Audacity.

As far as I can tell, the journal has its own citation style, but it somewhat resembles APA.

(I was able to find an address for the Python Software Foundation, but it seems that this entity exists to promote Python, not develop it.)

3
  • Some answers-in-comments and other discussion has been moved to chat.
    – cag51
    Commented Mar 24, 2022 at 20:42
  • 3
    "used Python (v3.8.8, Internet, volume 17, page 23)." Commented Mar 25, 2022 at 10:26
  • If you use commas to separate the Python version (e.g. "Python, v3.8.8, more text"), rather than parentheses, it probably won't be confused with the citation style you're using, which has usurped parentheses to indicate a citation.
    – Makyen
    Commented Mar 25, 2022 at 17:54

4 Answers 4

48

The copy editor might just never have heard of Python/has no idea what it is and therefore asked for the details with a sort of standard request. You can react as @MassimoOrtolano suggests in his comment:

You don't have to comply with all copy editor's requests. When something does not apply, reply to the query by explaining that it doesn't and why.

I would also advise to look into the documentation of the packages you used how they would like to be cited. For example, scikit-learn asks for:

If you use scikit-learn in a scientific publication, we would appreciate citations to the following paper:

Scikit-learn: Machine Learning in Python, Pedregosa et al., JMLR 12, pp. 2825-2830, 2011.

Together with the version number, citing as requested should give enough context so that it is absolutely clear what it is that you are using, and the copy editor should be happy.


There is a relevant old question here already: How do I reference the Python programming language in a thesis or a paper?. The answer by @Dexter links to here:

https://docs.python.org/3/faq/general.html#are-there-any-published-articles-about-python-that-i-can-reference

There you find some info from the Python Software Foundation on how to cite. On the same page, you also find:

Where in the world is www.python.org located?

The Python project’s infrastructure is located all over the world and is managed by the Python Infrastructure Team.

4
  • Thank you. I ended up writing a brief note suggesting the simple inline citation Python (v3.8.8, python.org). In general, I try to cite software and coding languages in the bibliography only when they are integral to the research. For example, if there were a special feature of Python that made it the best choice for this research, or if I were doing a comparative study of which programming languages were best for a certain task. In this case I will usually try to find a paper that the developers wrote introducing the language.
    – Max
    Commented Mar 24, 2022 at 3:33
  • 6
    However, in this case, we could have done our calculations in any language; the choice of Python was purely incidental. Citing Python would feel (IMO) a bit like citing Microsoft Word because we used it to type and spellcheck our manuscript.
    – Max
    Commented Mar 24, 2022 at 3:33
  • 6
    @Max, I think you made the right choice here. In fact, your Microsoft Word example is not so far-fetched. I was indeed asked in one instance to explain which program I used to make some simple plots. I have no problem to give credit to matplotlib, so I did. I would not be surprised to be asked to give credit to my word processor at some point. Commented Mar 24, 2022 at 9:47
  • 7
    @Snijderfrey Pencil (Dixon Ticonderoga, Lake Mary, FL, USA) and Paper (Georgia-Pacific, Atlanta, Georgia, USA). Commented Mar 25, 2022 at 12:42
6

I understand your hesitance to use the Python Foundation, but as they also handle distribution, in addition to promotion (https://www.python.org/downloads/) and the official documentation repository(https://docs.python.org/3/), I'd say it's the correct reference.

According to the legal documents on the python site (https://www.python.org/about/legal/)

Except where otherwise specified, the contents of this website are copyright © 1990-2014, Python Software Foundation, 9450 SW Gemini Dr., ECM# 90772, Beaverton, OR 97008, USA. All rights reserved.

That would certainly be a defendable, if not correct, location to use.

3
  • 1
    It is not clear (but I haven't researched it) whether the distributed version of the Python language is "contents of this website". I suspect is is more of "where otherwise specified", which in turn would be some license agreement somewhere. Commented Mar 23, 2022 at 18:44
  • 1
    @manassehkatz-Moving2Codidact -- I wasn't using the "contents of this website" part as a justification that it is the correct citation, so much as an address the Foundation uses in legal docs. Commented Mar 23, 2022 at 19:05
  • 3
    -1 I would argue that this essentially assigns credit to the foundation, which actually steals credit from many of the people responsible for the actual thing used for the paper, who aren't associated with the foundation — sort of like assigning all affiliations on that LHC paper to the University of Adelaide just because you can't be bothered to do any better. It also kicks the can down the road for other OSS packages. The copy-editor made a nonsensical request, and it should be treated as such.
    – Mike
    Commented Mar 25, 2022 at 14:06
4

The best way to reference a software is to reference its manual (which hopefully exists). This can of course be problematic if the "manual" is some lose collection of web pages or the like. It is quite simple if the manual is compiled into a pdf. In the case of Python there are suggested references given by this python citation suggestion. Please note that your can enter the reference yourself into the format that you see fit. In the case of additions to python it will be a question of sourcing similar references to manuals or find some established source URL.

1

As a general rule, if you use the code, you should cite the code. Citing papers about the code, or random instruction manuals, or even the official documentation doesn't help people reproduce your results, and can actually steal credit from the people who wrote the code, because the papers/manuals/documentation may be written by a very different set of people.

For OSS packages like you're talking about, location doesn't make any sense, and the journal is probably quite capable of dealing with this fact. Rather, citing OSS packages generally involves citing the full name of the code and specific version you used, and where the code came from. Increasingly, OSS authors are coming to realize that it is helpful if they use things like CITATION.cff files, and mint DOIs along with their versions. If they don't, you can usually request such a thing, and often get it. (My guess is that cpython hasn't done this because they don't know how to handle the author list.) But even when this isn't possible, you can usually find a permanent link on sites like github and pypi, and just cite it like any other URL. These are usually short citations; even the date is optional once the version is supplied.

If the authors specify (like scikit-learn) that they want you to cite something else, you should also cite that. This can also be important, because a lot of academic work may have gone into developing the techniques used by the code, which also deserves to be cited. But if there's any divergence between the code described in that reference and the actual version of code that you used, you need to supply more information in the form of a separate, specific reference.

2
  • While the consensus seems to favor citing manuals or papers rather than the code itself, I agree with you that this is a citational practice we ought to try to change. However, I also think your answer should also allow some flexibility for light, inline citations of code that was used as a "tool" but didn't play an integral part in the research (see my comments on the accepted answer above)—for the same reason that we don't need to create a separate bib entry to say "On March 26, Jeff Bezos tweeted that..."
    – Max
    Commented Mar 25, 2022 at 23:59
  • @Max I would say the library name and version are a good middle ground. My time is scarce and software tends to be flimsy; I, as a reader, am interested in what was shown to work to an extent displayed in the paper. Even if it is an especially nice-looking plot (although I do not expect authors to include this information as being waaaay outside the domain). A repo would help me the most, but imposes a large additional burden on the authors, while saying "we did it with a 50 year old algorithm you could implement in any language" is more of "okay then, keep your secrets".
    – Lodinn
    Commented Mar 27, 2022 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .