A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-May/064858.html below:

[Python-Dev] Alternative path suggestion

[Python-Dev] Alternative path suggestion [Python-Dev] Alternative path suggestionGreg Ewing greg.ewing at canterbury.ac.nz
Fri May 5 02:59:24 CEST 2006
Mike Orr wrote:

> The main difficulty with this approach is it's so radical.  It would
> require a serious champion to convince people it's as good as our
> tried-and-true strings.

Another thing you would need to do is implement it for
some of the less Unix-like path syntaxes, such as Classic
MacOS and VMS, to make sure that it's feasible to fit
them into your tuple-like format.


> The question is, does forcing people to use .stat() expose an
> implementation detail that should be hidden, and does it smell of
> Unixism?  Most people think a file *is* a regular file or a directory.
>  The fact that this is encoded in the file's permission bits -- which
> stat() examines -- is a quirk of Unix.

Permission bits aren't the only thing that stat() examines.
I don't see anything wrong with having stat() be the way to
get at whatever metadata there is about a file on a platform.
And having .isdir etc. attributes on the stat() result
abstracts whether they're obtained from the permission bits
or not.

--
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4