[ python-Bugs-1722485 ] Option -OO doesn't remove docstrings

SourceForge.net noreply at sourceforge.net
Fri Jun 1 13:34:40 CEST 2007


Bugs item #1722485, was opened at 2007-05-21 08:18
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1722485&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: None
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 7
Private: No
Submitted By: Grzegorz Adam Hankiewicz (gradha)
Assigned to: Nobody/Anonymous (nobody)
Summary: Option -OO doesn't remove docstrings

Initial Comment:
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

----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2007-06-01 11:34

Message:
Logged In: YES 
user_id=849994
Originator: NO

Fixed in rev. 55732, 55733 (2.5).

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2007-05-23 18:26

Message:
Logged In: YES 
user_id=11105
Originator: NO

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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1722485&group_id=5470


More information about the Python-bugs-list mailing list