# HG changeset patch # User cmlenz # Date 1156551423 0 # Node ID 56f5e93edc48791e8bea11a9a40f369eb6c9d133 # Parent 516a6cae0aa86466987f54eb03e9cffed2dae260 Add doctest to verify that the `py:attrs` directive correctly handles a sequence of `(name, value)` tuples. diff --git a/markup/template.py b/markup/template.py --- a/markup/template.py +++ b/markup/template.py @@ -194,8 +194,9 @@ class AttrsDirective(Directive): """Implementation of the `py:attrs` template directive. - The value of the `py:attrs` attribute should be a dictionary. The keys and - values of that dictionary will be added as attributes to the element: + The value of the `py:attrs` attribute should be a dictionary or a sequence + of `(name, value)` tuples. The items in that dictionary or sequence are + added as attributes to the element: >>> tmpl = Template('''