From eaf86858d40d40384375bd967b34818d0d8a9979 Mon Sep 17 00:00:00 2001 From: Preston Timmons Date: Mon, 16 Mar 2015 10:55:43 -0500 Subject: [PATCH] [1.7.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 9e5964c9ff..a76d325e0f 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -322,6 +322,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