Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue4764

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:open('existing_dir') -> IOError instance's attr filename is None
Type:behaviorStage:
Components:Library (Lib)Versions:Python 3.0, Python 2.4, Python 2.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: benjamin.peterson, zuo
Priority:normalKeywords:

Created on2008-12-29 01:03 byzuo, last changed2022-04-11 14:56 byadmin. This issue is nowclosed.

Messages (2)
msg78437 -(view)Author: Jan Kaliszewski (zuo)Date: 2008-12-29 01:03
Py2.4 and 2.5 (and probably other 2.x releases too):>>> try: f=open('existing_dir')... except IOError, exc: print exc.filename...None(expected result: "existing_dir")Py3.0 (and possibly 3.1 too):>>> try: f=open('existing_dir')... except IOError as exc: print(exc.filename)...None(expected result: "existing_dir")But no problems with:open('existing_dir', 'w')=> exc.filename=='existing_dir'open('not_existing_file') => exc.filename=='not_existing_file'Guess:It may be similar to issue#599163Platform/system info:[GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2Linux 2.6.25-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz* Py2.4 == Python 2.4.4 (#1, Oct  7 2008, 13:16:18)* Py2.5 == Python 2.5.2 (r252:60911, Sep 15 2008, 12:11:51)* Py3.0 == Python 3.0 (r30:67503, Dec 29 2008, 01:15:48)
msg78469 -(view)Author: Benjamin Peterson (benjamin.peterson)*(Python committer)Date: 2008-12-29 17:57
Fixed inr68014 andr68016.
History
DateUserActionArgs
2022-04-11 14:56:43adminsetgithub: 49014
2008-12-29 17:57:18benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: +msg78469
nosy: +benjamin.peterson
2008-12-29 01:03:51zuocreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp