[Python-ideas] os.listdir default to '.'

Ben Finney ben+python at benfinney.id.au
Thu Jan 12 23:26:10 CET 2012

Cameron Simpson <cs at zip.com.au> writes:

> I think it should be '.' [instead of ‘os.path.curdir’].
> It is possible to arrange directory permissions so that you can't open
> curdir because it traverses a directory to which one lacks permissions,
> but you can still open '.'.

What distinction are you drawing?

    >>> os.path.curdir

Do you get a different result?

 \       “Working out the social politics of who you can trust and why |
  `\      is, quite literally, what a very large part of our brain has |
_o__)                                   evolved to do.” —Douglas Adams |
Ben Finney

More information about the Python-ideas mailing list