src/pylib/Lib/n_inspect

Search:
Group by:
Source   Edit  

Procs

func cleandoc(s: string): string {.inline, ...raises: [], tags: [], forbids: [].}

Cleans up a docstring by removing leading whitespace and trailing newlines.

The first line of the docstring is also removed, as it is assumed to be the docstring's summary.

The docstring is also trimmed of leading and trailing whitespace.

Source   Edit  
proc getmodulename(obj: string): string {....raises: [ValueError], tags: [],
    forbids: [].}
PY-DIFF: This cannot returns None, but may raise a ValueError. Source   Edit  

Macros

macro getdoc(obj: typed): string
Source   Edit  
macro getsourcelines(obj: typed): (seq[string], int)
Source   Edit