HackerTrans
トップ新着トレンドコメント過去質問紹介求人

alextremblay

no profile record

コメント

alextremblay
·8 か月前·議論
A general purpose compiled language should be suitable for writing its own compiler, but I don’t think the same holds true for interpreted languages.
alextremblay
·9 か月前·議論
not sure if this is a typo or a misunderstanding, but to be clear: pdoc does not treat a comment immediately below a variable declaration as a docstring, it treats an unassigned string immediately following a variable declaration as a docstring, same as how python treats an unassigned string literal immediately following a function signature as a docstring

    my_var = 5
    "documentation for my_var"

    def my_func():
        "documentation for my_func"

also worth noting, pdoc didn't invent this design pattern, sphinx did (or perhaps something preceding sphinx?)

and since sphinx is the documentation tool of choice by the python core devs to document python itself, i have to assume they've given this design pattern at least tacit approval... :shrug: