Python is readable

Alec Taylor alec.taylor6 at gmail.com
Thu Mar 15 10:17:49 EDT 2012


On Fri, Mar 16, 2012 at 1:06 AM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
> Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>> with open("filename", "w") as f
>  File "<stdin>", line 1
>
>    with open("filename", "w") as f
>                                  ^
> SyntaxError: invalid syntax
>
> --
> Cheers.
>
> Mark Lawrence.
>

Erred for me also; but under f:

Python 2.7.3rc1 (default, Feb 24 2012, 21:28:59) [MSC v.1500 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> with open("filename", "w") as f
  File "<stdin>", line 1
    with open("filename", "w") as f
                                              ^
SyntaxError: invalid syntax



More information about the Python-list mailing list