[Zope-Coders] Mail delivery failed: returning message to sender

Mail Delivery System Mailer-Daemon@python.org
Wed, 25 Sep 2002 19:17:35 -0400


This message was created automatically by mail delivery software (Exim).

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  djay@innocent.com
    SMTP error from remote mailer after RCPT TO:<djay@innocent.com>:
    host innocent-com.mr.outblaze.com [205.158.62.23]:
    553 5.3.0 <djay@innocent.com>... inactive user

------ This is a copy of the message, including all the headers. ------

Return-path: <zope-coders@zope.org>
Received: from [12.155.117.30] (helo=cvs.baymountain.com ident=Zope)
	by mail.python.org with esmtp (Exim 4.05)
	id 17uLOU-0000W8-00; Wed, 25 Sep 2002 19:16:34 -0400
From: "Collector: Zope Bugs, Features, and Patches ..." <zope-coders@zope.org>
To: Dylan Jay <djay@slarken.org.au>, djay <djay@innocent.com>, klm <klm@zope.com>, Brian <brian@zope.com>, chrism <chrism@zope.com>, Caseman <casey@zope.com>, _Rejected_ recipient <zope-collector-monitor@zope.org>
Subject: [ZC] 585/ 3 Comment "ZPT doesn't handle strings in python expressions due to ignoring quotes"
X-Recipients-debug: ['Anonymous User', 'djay', 'klm', 'Brian', 'chrism', 'Caseman', ('_Rejected_ recipient', 'zope-collector-monitor@zope.org')]
Message-Id: <E17uLOU-0000W8-00@mail.python.org>
Date: Wed, 25 Sep 2002 19:16:34 -0400
X-Spam-Status: No, hits=-1.0 required=5.0 tests=BODY_PYTHON_ZOPE,SUPERLONG_LINE
X-Spam-Level: 

Issue #585 Update (Comment) "ZPT doesn't handle strings in python expressions due to ignoring quotes"
 Status Rejected, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/585

==============================================================
= Comment - Entry #3 by djay on Sep 25, 2002 7:16 pm

I'm not an idiot, I realize the issue is the semi-colon. What I'm saying is that its pretty crappy that you have to quote semicolons inside quotes when normal python code you don't have to. It's not hard to ignore them when in quotes. Doubling them in a 'string:' expression I can understand, but not a python expression.
________________________________________
= Reject - Entry #2 by evan on Sep 25, 2002 12:37 pm

 Status: Pending => Rejected

The problem here isn't the quotes -- it is the semicolon.  All semicolons in a tal:attributes expression must be escaped by doubling, since single semicolons are used to separate attribute assignments.  The correct form is:

tal:attributes="style python:'position: absolute;; background: %s;; left: %s px;; top: %s px' % (10,10,10,10)"
________________________________________
= Request - Entry #1 by Anonymous User on Sep 24, 2002 12:29 am

If I have an expression such as 
<b tal:attributes="
   style python:'position: absolute; background: %s; left: %s px; top: %s px' % (10,10,10,10)">

The parser doesn't like it. It is reading the semicolon as the end of the expression even though it's in a quotes and giving an error that %s is an illegal variable.

==============================================================