Message256755
| Author |
vstinner |
| Recipients |
SilentGhost, benhoyt, mont29, paul.moore, steve.dower, tim.golden, vstinner, zach.ware |
| Date |
2015年12月20日.09:13:48 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAMpsgwZj3umnhxQaFKi=EHuNS4P_Tqj0mstRo34Ze9Op4PnK4w@mail.gmail.com> |
| In-reply-to |
<1450548688.52.0.0016630706434.issue25911@psf.upfronthosting.co.za> |
| Content |
Regressions are not cool, but it was a deliberate choice to not support
bytes filenames in os.scandir(). If you use bytes, you can get filenames
which are invalid: you will be unable to use the filename with open() to
read its content for example.
Bytes filename are deprecated since python 3.2 if i recall correctly. It's
time to use the right time, it's also simpler to use on Python 3.
I suggest to document the regression rather than adding bytes support to
os.scandir or don't use scandir in os.walk(). |
|