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
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.