From ff71d6b8de97f21208cf41cadb7fbe0bf7134bf3 Mon Sep 17 00:00:00 2001 From: Preston Timmons Date: Mon, 16 Mar 2015 10:55:43 -0500 Subject: [PATCH] [1.8.x] Documented Context.get() method. Backport of 4d9414098bd98aacd241827a01f6ad2dff71f113 from master --- docs/ref/templates/api.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index c7a52830c3..63d93d8c5c 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -415,6 +415,11 @@ dictionary syntax:: >>> c['newvariable'] 'hello' +.. method:: Context.get(key, otherwise=None) + + Returns the value for ``key`` if ``key`` is in the context, else returns + ``otherwise``. + .. method:: Context.pop() .. method:: Context.push() .. exception:: ContextPopException