[Python-Dev] Add os.path.resolve to simplify the use of os.readlink
Antoine Pitrou
solipsis at pitrou.net
Thu Jun 21 15:16:26 CEST 2012
On Thu, 21 Jun 2012 15:04:17 +0200
Christian Heimes <lists at cheimes.de> wrote:
>
> How about adding keyword support to OSError and derive the strerror from
> errno if the second argument is not given?
That's not the original behaviour:
Python 3.2.2+ (3.2:9ef20fbd340f, Oct 15 2011, 21:22:07)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> e = OSError(5)
>>> e.errno
>>> e.strerror
>>> str(e)
'5'
I don't mind making this particular compatibility-breaking change,
though.
Regards
Antoine.
More information about the Python-Dev
mailing list