Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39692 > unrolled thread

Should Docstrings include RFC citations? - And are non PEP257 syntaxes frowned upon?

Started byAlec Taylor <alec.taylor6@gmail.com>
First post2013-02-24 05:14 +1100
Last post2013-02-24 05:14 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Should Docstrings include RFC citations? - And are non PEP257 syntaxes frowned upon? Alec Taylor <alec.taylor6@gmail.com> - 2013-02-24 05:14 +1100

#39692 — Should Docstrings include RFC citations? - And are non PEP257 syntaxes frowned upon?

FromAlec Taylor <alec.taylor6@gmail.com>
Date2013-02-24 05:14 +1100
SubjectShould Docstrings include RFC citations? - And are non PEP257 syntaxes frowned upon?
Message-ID<mailman.2363.1361643304.2939.python-list@python.org>
PEP257 defines docstring syntax, but I find myself arbitrarily extending it.

I have seen some Flask libraries floating around which utilise this syntax:

    def get_token_from_post_data(self, data):
        """Get a token response from POST data.

        :param data: POST data containing authorization information.
        :type data: dict
        :rtype: requests.Response
        """

I am trying to conform to the PEP257 syntax, but find myself
arbitrarily extending it with RFC citations…

However this "Flask syntax" seems to be more readable!

So I was thinking to extend it like so:

:param <var>: <desc>
:param_ref <var>: <RFC section>

What's your take on these syntaxes?

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web