PEP 255: Simple Generators, Revised Posting

Skip Montanaro skip at
Mon Jun 25 14:30:37 EDT 2001

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

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

My peephole optimizer would have removed it...

Skip Montanaro (skip at

More information about the Python-list mailing list