From cbd54a4b2cae809bcc8362ef8f0609d148d0781f Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 31 Aug 2018 10:32:36 -0400 Subject: [PATCH] added more reasons to avoid dot notation (#43724) --- docs/docsite/rst/reference_appendices/faq.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/docsite/rst/reference_appendices/faq.rst b/docs/docsite/rst/reference_appendices/faq.rst index 262c98da47..e029b801b5 100644 --- a/docs/docsite/rst/reference_appendices/faq.rst +++ b/docs/docsite/rst/reference_appendices/faq.rst @@ -466,6 +466,13 @@ for a list of the known public attributes. Also array notation allows for dynamic variable composition, see dynamic_variables_. +Another problem with 'dot notation' is that some keys can cause problems because they collide with attributes and methods of python dictionaries. + +.. code-block:: jinja + + item.update # this breaks if item is a dictionary, as 'update()' is a python method for dictionaries + item['update'] # this works + .. _argsplat_unsafe: