id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
46	<py:with> directive doesn't handle multiple assignement	cboos	cmlenz	"While trying to find a better workaround for #45, I got another backtrace (not my day :( ):
{{{
#!xml
<!DOCTYPE html
    PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN""
    ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">

<html xmlns=""http://www.w3.org/1999/xhtml""
    xmlns:py=""http://markup.edgewall.org/"" >

  <body py:match=""body"">${select('*')}</body>

  <body>

    <!--! This doesn't work, see #45
    <py:for each=""idx, (k, v) in enumerate(dict(a=1, b=2).items())"">
      <p>$idx: key=$k value=$v</p>
    </py:for>
    -->

    <!--! ... but this workaround doesn't work either -->
    <py:for each=""idx, item in enumerate(dict(a=1, b=2).items())""
      py:with=""k, v = item"">
      <p>$idx: key=$k value=$v</p>
    </py:for>

  </body>
</html>
}}}

Fails with:
{{{
Traceback (most recent call last):
  File ""<string>"", line 1, in ?
  File ""c:\workspace\src\trac\markup\trunk\markup\template.py"", line 1154, in load
    tmpl = Template(fileobj, basedir=dirname, filename=filename)
  File ""c:\workspace\src\trac\markup\trunk\markup\template.py"", line 755, in __init__
    self.parse()
  File ""c:\workspace\src\trac\markup\trunk\markup\template.py"", line 810, in parse
    directives.append(cls(value, *pos))
  File ""c:\workspace\src\trac\markup\trunk\markup\template.py"", line 693, in __init__
    self.vars.append(([n.name for n in node.nodes],
AttributeError: AssTuple instance has no attribute 'name'
}}}

Same remark as before, it's not absolutely necessary to support, but if not:
 - it should be documented
 - it should fail more gracefully

... and of course, it would be nice to have it!"	defect	closed	minor	0.3	Template processing	devel	fixed	py:with	
