Цитирование публикаций в классе или функцииPython

Программы на Python
Anonymous
Цитирование публикаций в классе или функции

Сообщение Anonymous »

Я написал класс с функциями, реализующими алгоритм, описанный в публикации. Как правильно процитировать публикацию в моем коде? Должен ли я сделать это в строке документации, в файле README или каким-либо другим способом?
Пример:

Код: Выделить всё

class CylceRemover:
"""
This class implements a greedy heuristic algorithm described in the following paper:

@inproceedings{Sun:2017:BCN:3091478.3091495,
author = {Sun, Jiankai and Ajwani, Deepak and Nicholson, Patrick K. and Sala, Alessandra and Parthasarathy, Srinivasan},
title = {Breaking Cycles In Noisy Hierarchies},
booktitle = {Proceedings of the 2017 ACM on Web Science Conference},
series = {WebSci '17},
year = {2017},
isbn = {978-1-4503-4896-6},
location = {Troy, New York, USA},
pages = {151--160},
numpages = {10},
url = {http://doi.acm.org/10.1145/3091478.3091495},
doi = {10.1145/3091478.3091495},
acmid = {3091495},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {cycle edges, directed acyclic graph, graph hierarchy, social agony, trueskill},
}
...

"""

def __init__(self, G: nx.DiGraph) -> None:
....

Это достаточная цитата или есть лучший и более устоявшийся способ?


Подробнее здесь: https://stackoverflow.com/questions/783 ... r-function

Вернуться в «Python»