This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients DragonFireCK, Horpner, alex, benjamin.peterson, brett.cannon, bruno.dupuis, cvrebert, georg.brandl, ikelly, mrabarnett, ncoghlan, python-dev, steven.daprano, terry.reedy
Date 2012-12-05.22:39:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354747146.96.0.0540996081195.issue16619@psf.upfronthosting.co.za>
In-reply-to
Content
(2.6 is security fix only)

Stripping truly dead code after return is really tricky in general because
a) it might be in a conditional block, and 
b) unreachable yield and assignment can affect compilation.
Assignments that make names local are detected on a first pass, but I do not know about yield. Anyway, I believe the policy has been to not do it.

The final patch will need a cpython-only test based on g(x), with dead code.

Possibly intersecting issues are proposals to change where optimization is done and, for testing, to add a generator to dis so its output can be directly captured and analyzed instead of having to redirect, capture, and parse stdout.
History
Date User Action Args
2012-12-05 22:39:06terry.reedysetrecipients: + terry.reedy, brett.cannon, georg.brandl, ncoghlan, ikelly, Horpner, benjamin.peterson, mrabarnett, steven.daprano, alex, cvrebert, python-dev, DragonFireCK, bruno.dupuis
2012-12-05 22:39:06terry.reedysetmessageid: <1354747146.96.0.0540996081195.issue16619@psf.upfronthosting.co.za>
2012-12-05 22:39:06terry.reedylinkissue16619 messages
2012-12-05 22:39:06terry.reedycreate