Hello,

>     try:
>         songs = [Song(id) for id in song_ids]
>     except Song.DoesNotExist:
>         print "unknown song id (%d)" % id
that's is a bad programming style. So it will be forbidden with python 3. The 
reason is that list comprehension is a construct from the functional world. 
It's only syntactic sugar for the functions map and filter. So functions have 
to be pure functions. To say it in other words, they have to be side-effect 
free. But the python construct from above pollutes the namespace with name id.

Greetings from Rottenburg,
Rainer
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to