New submission from Nathan Turner:

In Python Tutorial -- Section 8.7 "Predefined Clean-up Action"
When following the "with open..." commands explicitly Python 2.5 will
generate a Syntax Error;
"There's an error in you program: invalid syntax"

It would be nice if a foot note existed that took you to Python
Reference Manual -- section 7.5 "The with statement"
In that section it explains that in Python 2.5 you need to use

from __future__ import with_statement


For new users this might frustrate.

----------
components: Documentation
messages: 58659
nosy: astral451
severity: normal
status: open
title: with Statement Error generated following Tutorial
type: compile error
versions: Python 2.5

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1634>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to