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

Pieter Nagel pieter at nagel.co.za
Mon May 6 21:28:13 CEST 2013


On Mon, 2013-05-06 at 20:12 +0100, MRAB wrote:

> I suppose it depends on what it means by "new code". If you're adding
> to an existing module, is consistency more important?

I'm adding code to stat_result, so that's what I have to be consistent
with.

But all of the current names there st_size, st_mode and so on, derive
1:1 from the POSIX standard for the relevant struct in C.

And POSIX does not provide any guidance for *new* names for additional
behaviour in unrelated languages that expose the underlying stat struct.
Yes, I could name the methods "st_is_file" and the like for
"consistency" with the other st_ prefixed names, but that would be just
silly.

So what else remains in stat_result for me to be consistent with?
Nothing. When it comes to names for methods, stat_result is currently a
blank slate.

Which, to my mind, means that PEP 8 should be followed here.

-- 
Pieter Nagel





More information about the Python-ideas mailing list