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

Tarek Ziadé ziade.tarek at gmail.com
Sat May 23 01:19:59 CEST 2009


On Sat, May 23, 2009 at 1:16 AM, Georg Brandl <g.brandl at gmx.net> wrote:
> Antoine Pitrou schrieb:
>> Tarek Ziadé <ziade.tarek at ...> writes:
>>>
>>> A very small change: what about making the path argument optional for
>>> os.listdir ? and use the current working directory if
>>> not provided.
>>
>> Disagreed. If you want the current directory, you just have to use ".".
>
> or os.curdir to be precise :)

yes, same question then, make these equivalent:

os.listdir(os.curdir)  <-> os.listdir()



More information about the Python-ideas mailing list