classification
Title: Option -OO doesn't remove docstrings
Type: Stage:
Components: None Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, gradha, theller
Priority: high Keywords:

Created on 2007-05-21 08:18 by gradha, last changed 2007-06-01 11:34 by georg.brandl. This issue is now closed.

Messages (3)
msg32100 - (view) Author: Grzegorz Adam Hankiewicz (gradha) Date: 2007-05-21 08:18
I'm using Python 2.5.1 as said by the -V switch under Windows XP. I run one of my programs with -OO, which generates a good amount of .pyo files in the directory. According to -h the -OO parameter removes docstrings. However, when I open the .pyo files with vim I can see all the docstrings in plain text.

Conclusion, docstrings are not being removed. I noticed this in 2.5, which prompted me to upgrade after this thread: http://sourceforge.net/mailarchive/forum.php?thread_name=464D5A57.2060809%40rastertech.es&forum_name=py2exe-users
msg32101 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2007-05-23 18:26
I can confirm this bug (but have no time to work on a patch).
This simple script prints 'the docs' when run with 'python2.5 -OO',
but prints 'None' when run with Python2.4 (for example).

IMO this should be fixed in the next maintainance release, so raising the priority.
msg32102 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-06-01 11:34
Fixed in rev. 55732, 55733 (2.5).
History
Date User Action Args
2007-05-21 08:18:18gradhacreate