May 23, 2009
1:28 a.m.
"Raymond Hettinger" <python@rcn.com> wrote:
os.listdir(os.curdir) <-> os.listdir()
+1
Lots of functions have useful defaults and this one would be familiar to everyone who programs (what does "dir" do without arguments on Windows or an "ls" do without arguments for Linux).
+1. I remember being surprised that os.listdir() did not work (I was expecting the requested behavior). If this were not parallel to the default behavior of ls and dir I'd be -1, but as it is I think it is less surprising for it to work. --David