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

Pieter Nagel pieter at nagel.co.za
Mon May 6 11:18:15 CEST 2013


On Mon, 2013-05-06 at 18:50 +1000, Nick Coghlan wrote:

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

It seems you see a need to be able to create stat_result objects that do
not represent any actual files on your filesystem, but rather represent
potential files that could exist on your (or another) filesystem.

I'm curious as to the use cases you see?

> 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.

Actually exists() is what led me down that path, I just forgot it when I
wrote the PEP.

But for now, I'm not sure if the whole null object proposal is going to
fly at all. I kind of like it, but I I can't call to mind any other
prior art for such null objects in the stdlib.


-- 
Pieter Nagel





More information about the Python-ideas mailing list