[Python-ideas] Add a __cite__ method for scientific packages

Adrian Price-Whelan adrianmpw at gmail.com
Fri Jun 29 00:16:08 EDT 2018


For me, it's about setting a standard that is endorsed by the
language, and setting expectations for users. There currently is no
standard, which is why packages use __citation__, __cite__,
__bibtex__, etc., and as a user I don't immediately know where to look
for citation information (without going to the source). My feeling is
that adopting __citation__ or some dunder name could be implemented on
classes, functions, etc. with less of a chance of naming conflicts,
but am open to discussion.

I have some notes here about various ideas for more advanced
functionality that would support automatically keeping track of
citation information for imported packages, classes, functions:
https://github.com/adrn/CitationPEP/blob/master/NOTES.md

On Thu, Jun 28, 2018 at 10:57 PM, Alex Walters <tritium-list at sdamon.com> wrote:
> Why not scipy.cite() or scipy.citation()?  I don't see any reason for these
> functions to ship with standard python at all.
>
>> -----Original Message-----
>> From: Python-ideas <python-ideas-bounces+tritium-
>> list=sdamon.com at python.org> On Behalf Of Steven D'Aprano
>> Sent: Thursday, June 28, 2018 8:17 PM
>> To: python-ideas at python.org
>> Subject: Re: [Python-ideas] Add a __cite__ method for scientific packages
>>
>> On Thu, Jun 28, 2018 at 05:25:00PM -0400, Andrei Kucharavy wrote:
>>
>> > As for the list, reserving a __citation__/__cite__ for packages at the
> same
>> > level as __version__ is now reserved and adding a citation()/cite()
>> > function to the standard library seemed large enough modifications to
>> > warrant searching a buy-in from the maintainers and the community at
>> large.
>>
>> I think that an approach similar to help/quit/exit is warranted. The
>> cite()/citation() function need not be *literally* built into the
>> language, it could be an external function written in Python and added
>> to builtins by the site.py module.
>>
>>
>>
>>
>> --
>> Steve
>> _______________________________________________
>> Python-ideas mailing list
>> Python-ideas at python.org
>> https://mail.python.org/mailman/listinfo/python-ideas
>> Code of Conduct: http://python.org/psf/codeofconduct/
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/



-- 
Adrian M. Price-Whelan
Lyman Spitzer, Jr. Postdoctoral Fellow
Princeton University
http://adrn.github.io


More information about the Python-ideas mailing list