[Python-ideas] os.listdir with current working directory asdefault

Tennessee Leeuwenburg tleeuwenburg at gmail.com
Sat May 23 03:46:45 CEST 2009


+1

On Sat, May 23, 2009 at 11:28 AM, R. David Murray <rdmurray at bitdance.com>wrote:

> "Raymond Hettinger" <python at 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
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>



-- 
--------------------------------------------------
Tennessee Leeuwenburg
http://myownhat.blogspot.com/
"Don't believe everything you think"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20090523/5a6805c9/attachment.html>


More information about the Python-ideas mailing list