Feature Requests item #1538778, was opened at 2006-08-11 11:23 Message generated for change (Comment added) made by abadger1999 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1538778&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Toshio Kuratomi (abadger1999) Assigned to: Nobody/Anonymous (nobody) Summary: pyo's are not overwritten by different optimization levels Initial Comment: If I invoke "python -OO" on a set of files, python creates a set of .pyo files. If I then realize this is an incredibly stupid thing to do because it removes the docstrings from the output and this program requires those docstrings python does not give me a method of overwriting the generated .pyos. I anticipated that running "python -O" would detect that the already generated .pyos were created in a different optimixation level and overwrite them with new .pyos. Barring that, I expected there to be a command line switch to tell python to overwrite the previously generated .pyo cache files. Finding neither, I realized that the only way to recover docstrings for people using python -O was to rm all the generated .pyo files. This seems like a bug or a missing feature. ---------------------------------------------------------------------- >Comment By: Toshio Kuratomi (abadger1999) Date: 2006-08-16 14:25 Message: Logged In: YES user_id=944205 Thanks. PEP 304 is a bit different. It is specifying the ability to read and write bytecode to a different directory structure while this is specifying that bytecode, once written is taken as canoncical even when options on the python commandline would change the bytecode that is written. Another solution in addition to those above would be writing files with different extensions for different optimization levels although this seems worse than either of the other two changes. ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2006-08-16 09:18 Message: Logged In: YES user_id=21627 This is a feature request; classifying it as such. See also PEP 304 (notice it has been withdrawn). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1538778&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com