Issue 10553: Add optimize argument to builtin compile() and byte-compilation modules (original) (raw)

Issue10553

Created on 2010-11-27 20:38 by georg.brandl, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
compile-optimize.diff georg.brandl,2010-11-27 20:38 patch version 1 review
Messages (7)
msg122552 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-27 20:38
This patch adds an "optimize" parameter to compile(), as discussed in <http://mail.python.org/pipermail/python-ideas/2010-November/008784.html>. I also needed to introduce two new C APIs. Better naming suggestions are welcome.
msg122611 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2010-11-28 03:19
This looks fairly complete. I spotted the word "optimze" in there :) As for the C api, I always cringe when I add an "Ex" function myself, because it feels like I'm spending my last bullet. What to do if I need yet another parameter later? ExEx? For that reason, I have started to use an options structure with a "size" argument at the start more often. Ugly windows style. But since these functions haven't changed much for a long time, there is perhaps no need to fret. I didn't see an "optimize" option to PyZipFile, the original usecase this all sprung out of.
msg123328 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-04 10:26
Added PyZipFile API, and fixed the "optimze". Committed in r87019.
msg123380 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-04 17:55
As discussed on IRC, compileall had not gained a new command-line argument because “python -O -m compileall” does the job. Can I make a doc update for that, or do you think it may be obvious enough?
msg123381 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-04 17:56
Yes, a doc update is probably a good idea. (But after the freeze :)
msg123382 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-04 18:18
Temporarily reopening.
msg132211 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-03-26 02:23
New changeset 81c001680b36 by Éric Araujo in branch '3.2': #10553: Explain why compileall has no command-line argument to control optimization http://hg.python.org/cpython/rev/81c001680b36 New changeset 125fbebbb5cd by Éric Araujo in branch 'default': Merge #10553 followup from 3.2 http://hg.python.org/cpython/rev/125fbebbb5cd
History
Date User Action Args
2022-04-11 14:57:09 admin set github: 54762
2011-03-26 02:24:46 eric.araujo set status: open -> closedresolution: accepted -> fixedstage: resolved
2011-03-26 02:23:57 python-dev set nosy: + python-devmessages: +
2010-12-04 18🔞02 eric.araujo set status: closed -> openassignee: eric.araujomessages: +
2010-12-04 17:56:39 georg.brandl set messages: +
2010-12-04 17:55:43 eric.araujo set nosy: + eric.araujomessages: +
2010-12-04 10:26:54 georg.brandl set status: open -> closedresolution: acceptedmessages: +
2010-11-28 03:19:10 kristjan.jonsson set messages: +
2010-11-27 20:38:34 georg.brandl create