Using javadoc for Python documentation -


I am currently starting with Python and I have a strong PHP background and in PHP, I have read Javadoc < / Code> as a documentation template.

I was thinking that if it is replaced as the javadoc docstring in the documentation Python whatsoever anything to fit in the Python mindset Is or do I try to be as brief as possible? "" "replaces the sample place holder @ Parama string timestamp to display the formatted date @ Exclamation String Priority Priority Number @ Ultimate String Preferences_name priority name @ display the absolute string message message @ String for formatted string for "" "

And if I'm a bit too much, should I go with it instead, something like this (Where most of the documents __ doctor does not print through __ method)?

  # template replaces position holder # $ @ with the ultimate string # @ Ultimate String Priority # # to display the timestamp format date # @PRAM string preference_name priority name # The # # return string format string deaf format (auto, timestamp = '', priority = '', priority_name = '', message = '') to display @PRM string message message: "" "Template changes place holder with values" "value = {'% time stamp%': timestamp, '% priority name%': priority_name, '% priority%': priority, '% message%': message} return Self- .__ pattern.format (** value)    

Take a look at this ( Also known as "rest") format, which is a plain / docstring markup format, and perhaps Python is the most popular in the world and you It should look as follows, a tool to generate documentation from a re-structured text (such as Python is used for documentation). Your code in Spinks (see) includes the possibility of removing the documentation from the docstring, and after some conventions, Recon recognize. This may be (or is happening) the most popular way of doing this.

Your example can look like this:

  "" "replaces the template placeholder with values: Ultimate timestamp: formatted date to display: priority number: Priority Number: Priority Priority: Priority Name: Ultimate Message: Message to Display: Return: Formatted String ""   

or Extended Information with Type:

  "" "to the template placeholder Varies with value: Ultimate Timestamp: Formatted Date to Display: Type Timestamp: str or Unicode: Ultimate Priority: Priority Number: Type Priority: str or Unicode: Para Priority_name: Priority Name: Type Preference Name: str or Unicode : Ultimate Message: Message to Display: Type Message: str or Unicode: Return: Formatted String: rtype: str or Unicode ""    

Comments