PEP 255: Simple Generators, Revised Posting

Skip Montanaro skip at pobox.com
Mon Jun 25 20:30:37 CEST 2001


    Rainer> "Bernhard Herzog" <bh at intevation.de> wrote in message
    Rainer> 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. :)

    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 pobox.com)
(847)971-7098




More information about the Python-list mailing list