PEP 255: Simple Generators, Revised Posting

Rainer Deyke root at rainerdeyke.com
Mon Jun 25 11:58:30 EDT 2001


"Bernhard Herzog" <bh at intevation.de> wrote in message
news:6qk8203myt.fsf at abnoba.intevation.de...
> > def emptyg():
> >     return
> >     yield None  # never reached
>
> Only until the compiler becomes smart enough to remove that unreachable
> yield statement. :)

By that time, the compiler will hopefully be smart enough to perform static
analysis *before* removing dead code.


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list