[Zope-dev] Required final newline in Script (Python) in Zope 2.4.3

2001-12-17 Thread Jean Jordaan

Hi people

I'm moving an app to Zope 2.4.3, and one thing I've discovered is
that methods that don't end with a final newline are invalid::

  Script line 13
REQUEST.RESPONSE.redirect(url)
 ^
  SyntaxError: invalid syntax

If I go press return after the ), everything is fine. 

Is this a feature? An inevitability? Is it Good For Me?

Regards,
Jean Jordaan

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Required final newline in Script (Python) in Zope 2.4.3

2001-12-17 Thread maxm

From: Jean Jordaan [EMAIL PROTECTED]

 I'm moving an app to Zope 2.4.3, and one thing I've discovered is
 that methods that don't end with a final newline are invalid::

 Is this a feature? An inevitability? Is it Good For Me?

That is a bug. There's no reason for such behaviour. Except for some lazy
;-) programmer doing::

for line in readlines:
line = line[:-1]

without checking if there is a non empty line in the end.

regards Max M


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )