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

George Sakkis george.sakkis at gmail.com
Sat May 23 02:09:06 CEST 2009


On Fri, May 22, 2009 at 8:01 PM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
> On Sat, May 23, 2009 at 1:46 AM, Georg Brandl <g.brandl at gmx.net> wrote:
>>>
>>> os.listdir(os.curdir)  <-> os.listdir()
>>
>> This seems to be a nice case of EIBTI to me.
>
> I would rather call that a default behavior, otherwise every function
> with arguments that have default
> values would be nice cases of EIBTI.

Agreed, nobody writes "dir ." or "ls .", the implicit argument is obvious.

George



More information about the Python-ideas mailing list