[Python-Dev] [Python-checkins] r53110 - python/trunk/Lib/mailbox.py (original) (raw)
A.M. Kuchling amk at amk.ca
Thu Dec 21 14:53:43 CET 2006
- Previous message: [Python-Dev] Listing of PEP 328 status and possible minor oversight
- Next message: [Python-Dev] [Python-checkins] r53110 - python/trunk/Lib/mailbox.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Dec 21, 2006 at 02:14:55AM -0500, Fred L. Drake, Jr. wrote:
I (only vaguely) recall Guido telling people that that's how it's documented, and that's what they should use. Don't know if he still feels that way; if he's recanted the obscure path, we can fix both the calls and the documentation. I'd lend a hand!
The constants were added in 2.5. I've gone ahead and made the documentation change to trunk and 25-maint, because why were the constants added if they weren't intended to be used?
While looking at the code, I noticed a minor potential bug. Python defines SEEK_SET and friends to be 0,1,2 and then os.lseek() maps them to SEEK_SET, SEEK_CUR, SEEK_END. file.seek() does not do this; it just passes the 0,1,2 through to the stdio fseek(), and therefore would be broken if there's some weird platform where 0,1,2 aren't the correct values. This doesn't seem worth fixing, given that no one has ever run into it, and might be an argument for removing the conversion from os.lseek(); clearly it isn't needed.
--amk
- Previous message: [Python-Dev] Listing of PEP 328 status and possible minor oversight
- Next message: [Python-Dev] [Python-checkins] r53110 - python/trunk/Lib/mailbox.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]