![]() Everything thrown into an examples section will be treated as code, so it'sĪdditional more comprehensive examples can be found in the test area. The brief must be the first item and be no longer than oneĤ. Most common names for sections are accepted,Īnd items and descriptions may be separated by either colons or dashes.ģ. Best practice human-readable section headersĢ. format( arg1 + arg2, arg1 / arg2, kwarg)ġ. ValueError """ assert isinstance( arg1, int) AssertionError > myfunction(5, 50, 'too big.') Traceback (most recent call last). ZeroDivisionError: integer division or modulo by zero > myfunction(4, 1, 'got it.') '5 - 4, got it.' > myfunction(23.5, 23, 'oh well.') Traceback (most recent call last). Examples: > myfunction(2, 3) '5 - 0, whatever.' > myfunction(5, 0, 'oops.') Traceback (most recent call last). Raises: ZeroDivisionError, AssertionError, & ValueError. This is an example of how a Pythonic human-readable docstring can get parsed by doxypypy and marked up with Doxygen commands as a regular input filter to Doxygen. """ Does nothing more than demonstrate syntax. This filter will correctly process code like the following working (albeitĭef myfunction( arg1, arg2, kwarg = 'whatever.'): If theĪutobrief option is enabled, docstrings are parsed via a set of regularĮxpressions and a producer / consumer pair of coroutines. Regular expressions tied to a state machine to figure out syntax, Python's ownĪbstract Syntax Tree module is used to extract items of interest. This project takes a radically different approach than doxypy. Will get appropriate Doxygen tags automatically added. In PEP 257 or that generally follow the stricter Google Python Style Guide Heuristically examines Python docstrings, and ones like the sample for complex Not to have special mark-up beyond conventional structured text. Interfaces and treats them accordingly, supplying Doxygen tags as appropriate.įundamentally Python docstrings are meant for humans and not machines, and ought This filter has basic understanding of these Furthermore, they frequentlyĭon't have any code beyond their docstrings, so naively removing docstrings Use embedded variable assignments to identify attributes, and use specificįunction calls to indicate interface adherence. ZOPE-style interfaces overload class definitions to be interface definitions, Trivial to mark off such sections of the docstring so they get displayed as Python frequently embeds doctests within docstrings. ![]() Yet, so this filter additionally provides Doxygen tags to label such variables Doxygen does not understand this natively Python class members whose names begin with a double-underscore are mangledĪnd kept private by the language. This addresses the issue of Doxygen merging inner functions' documentation with Thus can supply Doxygen tags marking namespaces on every function and class. Python can have functions and classes within both functions and classes.ĭoxygen best understands this concept via its notion of namespaces. Line options as doxypy, but handle additional Python syntax beyond docstrings. It is meant to support all the same command It shares little (if any) of the same code at this point (but maintains the This project started off as a fork of doxypy but quickly became quite distinct. It however does notĪddress any of the other previously mentioned areas of difficulty. On the fly per Doxygen's regular input filtering process. The excellent doxypy makes it possible to embed Doxygen commands in Pythonĭocstrings, and have those docstrings converted to Doxygen-recognized comments Input source code a little more like what it's expecting. It does however support inline filters that can be used to make It likewiseĭoesn't understand conventional constructs like doctests or ZOPE-style Generators, nested functions, decorators, or lambda expressions. Understand basic Python syntax constructs like docstrings, keyword arguments, It recognizes Python comments,īut otherwise treats the language as being more or less like Java. Intentįor now Doxygen has limited support for Python. ![]() ![]() A more Pythonic version of doxypy, a Doxygen filter for Python.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |