From 325bbf57920315a1457d500d5fec8867c0e0744b Mon Sep 17 00:00:00 2001 From: dkf Date: Mon, 1 Apr 2019 10:51:33 +0000 Subject: Document --- doc/dict.n | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/dict.n b/doc/dict.n index 1829768..12c9b1a 100644 --- a/doc/dict.n +++ b/doc/dict.n @@ -120,6 +120,19 @@ It is an error to attempt to retrieve a value for a key that is not present in the dictionary. .RE .TP +\fBdict getwithdefault \fIdictionaryValue \fR?\fIkey ...\fR? \fIkey default\fR +.VS "8.7, TIP342" +This behaves the same as \fBdict get\fR (with at least one \fIkey\fR +argument), returning the value that the key path maps to in the +dictionary \fIdictionaryValue\fR, except that instead of producing an +error because the \fIkey\fR (or one of the \fIkey\fRs on the key path) +is absent, it returns the \fIdefault\fR argument instead. +.RS +.PP +Note that there must always be at least one \fIkey\fR provided. +.RE +.VE "8.7, TIP342" +.TP \fBdict incr \fIdictionaryVariable key \fR?\fIincrement\fR? . This adds the given increment value (an integer that defaults to 1 if -- cgit v0.12