python-dev summary, 2001-03-19 - 2001-04-12
Paul Prescod
paulp at ActiveState.com
Sat Apr 14 13:22:50 EDT 2001
Ben Wolfson wrote:
>
>...
>
> Also, I discovered that the nested scopes (with and without a
> from-__future__ import) dumped core when dealing with the following list
> comp:
>
> [[locals.append(here),remotes.append(there) for here,there in\
> [stripped.split('\t') for strippied in\
> [line.strip() for line in open(fn).readlines()]\
> if stripped]\
> if path.exists(here)] for fn in filenames if path.exists(fn)]
If this is a serious bug report I'd encourage you make it in a separate
message with more information (platform, version, etc.). I can't
reproduce it based on what you've given.
from os import path
filenames = ["abc", "def"]
[[(locals.append(here),remotes.append(there)) for here,there in
[stripped.split('\t') for strippied in
[line.strip() for line in open(fn).readlines()]
if stripped]
if path.exists(here)] for fn in filenames if path.exists(fn)]
Works for me....
--
Take a recipe. Leave a recipe.
Python Cookbook! http://www.ActiveState.com/pythoncookbook
More information about the Python-list
mailing list