Josh Triplett <j...@joshtriplett.org> added the comment:

The current behavior of pydoc will cause synopsis to always incorrectly return 
"None" as the synopsis for any module with mtime == 0.  Both of the proposed 
fixes will fix that bug without affecting any case where mtime != 0, so I don't 
think either one has backward-compatibility issues.

I'd suggest using the fix of changing the .get call to return a default of 
(None, None) and changing the conditional to "lastupdate is not None and 
lastupdate < mtime".  That variant seems like more obvious code (since None 
clearly means "no lastupdate time"), and it avoids special-casing an mtime of 0 
and bypassing the synopsis cache.

I don't mind writing a patch if that would help this fix get in.  I'll try to 
write onein the near future, but I certainly won't mind if someone else beats 
me to it. :)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12603>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to