[Python-ideas] PEP: Extended stat_result (First Draft)

Nick Coghlan ncoghlan at gmail.com
Mon May 6 10:50:09 CEST 2013


On Mon, May 6, 2013 at 6:30 PM, Pieter Nagel <pieter at nagel.co.za> wrote:
> Following our discussion of last week, here is a first draft of the PEP
>
> PEP: XXX
> Title: Extended stat_result
> Version: $Revision$
> Last-Modified: $Date$
> Author: Pieter Nagel <pieter at nagel.co.za>
> Status: Draft
> Type: Standards Track
> Content-Type: text/x-rst
> Created: 03-May-2013
> Python-Version: 3.4
>
>
> Abstract
> ========
>
> This PEP proposes extending the result of ``os.stat()``, ``os.fstat()`` and
> ``os.lstat()`` calls with added methods such as ``is_file()``.  These added
> methods will obviate the need to use the ``stat`` module to interpret the
> result of these calls.

Good proposal.

Something it doesn't yet cover, and should, is a Python level API for
creating these new objects.

If we go down the path of allowing a "null" stat object, it would also
make sense to add an exists() method to the method API.

Cheers,
Nick.

--
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list