IT lexicon › Programming › Docstring

Docstring

Programming På svenska → Updated: 2026-05-24

Built-in documentation inside code — Python """triple quotes""", JS JSDoc, Rust doc comments.

Powers: IDE tooltips, auto-generated documentation (Sphinx, JSDoc, rustdoc), doctest. A good docstring states why + parameters + return value + example. Often generated now by AI assistants.

← Back to the lexicon