malthe/chameleon — Issue #100: python: expressions containing line-breaks not handled properly
Author: zopyx
Created: 2012-03-07 06:02:57+00:00
State: open

A ZPT containing

11 tal:replace="structure python: scale.scale('image',
12 width=250, height=250, direction='down').tag()" />

causes

Module chameleon.template, line 189, in render
Module chameleon.template, line 175, in render
Module 35965522f28e842ee01e1c56b5b1d7bf0930b199.py, line 415, in render
Module 621939ba8b9d39114735561e508d6c245122ed1c.py, line 1974, in render_master
Module 621939ba8b9d39114735561e508d6c245122ed1c.py, line 789, in render_content
Module 35965522f28e842ee01e1c56b5b1d7bf0930b199.py, line 181, in __fill_content_core
ExpressionError: invalid syntax

width=250, height=250, direction='down').tag()"
- Filename: /Users/ajung/sandboxes/weishaupt/src/weishaupt.policy/weishaupt/policy/browser/referencesfolder_view.pt

width=250, height=250, direction='down').tag()"
- Filename: /Users/ajung/sandboxes/weishaupt/src/weishaupt.policy/weishaupt/policy/browser/referencesfolder_view.pt
- Location: (0:580)

This behavior is odd since it is allowed in the standard ZPT implementation and especially because line-breaks in over-long
python expressions improve the readability.