Why do Python function docs include the comma after the bracket for optional args?

The square bracket means that the contents are optional, but everything outside of square brackets is compulsory. With your notation: RegexObject.match(string, [pos], [endpos]) I would expect to have to write: r.match(“foo”,,) The nesting is required because if you supply the third parameter then you must also supply the second parameter even though it is an … Read more

A tool to add and complete PHP source code documentation [closed]

I think PHP_Codesniffer can indicate when there is no docblock — see the examples of reports on this page (quoting one of those) : ——————————————————————————– FOUND 5 ERROR(S) AND 1 WARNING(S) AFFECTING 5 LINE(S) ——————————————————————————– 2 | ERROR | Missing file doc comment 20 | ERROR | PHP keywords must be lowercase; expected “false” but … Read more

How to document magic (_call and _callStatic) methods for IDEs

Use class-level PHPDoc comment — specifically @method tag — works fine in PhpStorm: /** * @method static someClass get_by_user_id(int $id) Bla-bla * @method static someClass get_first_by_id(int $id) */ abstract class a { … In the above: @method — PHPDoc tag static — tells that this is static method someClass or $this — return type get_by_user_id … Read more

Where are the man pages for C++? [closed]

If you use the “normal” libstdc++ shipped with g++, its documentation is available online here. Most Linux distributions make it also available offline as a particular package; for Debian-derived distros, for example, it’s libstdc++-6-<version>-doc (e.g. on my Ubuntu machine I have libstdc++-6-4.4-doc installed). In general the documentation will be put somewhere like /usr/share/doc/libstdc++-6-4.4-doc. This about … Read more

Using javadoc for Python documentation [closed]

Have a look at the reStructuredText (also known as “reST”) format, which is a plaintext/docstring markup format, and probably the most popular in the Python world. And you should certainly look at Sphinx, a tool to generate documentation from reStructuredText (used for eg. the Python documentation itself). Sphinx includes the possibility to extract documentation from … Read more

Google Apps Script Auto Generated Library Documentation

The jsdoc variant suported for libraries in Google Apps Script does not support documentation at the level you are looking for, only first-level functions. There is a relevant open bug report on this, but no response from Google. You can still write your jsdoc tags, and generate your documentation outside of the Google infrastructure. Take … Read more