Glenn Linderman wrote:
On approximately 4/29/2009 4:36 AM, came the following characters from
the keyboard of Cameron Simpson:
On 29Apr2009 02:56, Glenn Linderman <v+pyt...@g.nevcal.com> wrote:
os.listdir(b"")
I find that on my Windows system, with all ASCII path file names,
that I get quite different results when I pass os.listdir an empty
str vs an empty bytes.
Rather than keep you guessing, I get the root directory contents
from the empty str, and the current directory contents from an empty
bytes. That is rather unexpected.
So I guess I'd better suggest that a specific, equivalent directory
name be passed in either bytes or str form.
I think you may have uncovered an implementation bug rather than an
encoding issue (because I'd expect "" and b"" to be equivalent).
Me too.
Sounds like an issue for the tracker.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com