[Python-ideas] Move tarfile.filemode() into stat module

Giampaolo Rodolà g.rodola at gmail.com
Sat May 12 17:23:48 CEST 2012


2012/5/12 Antoine Pitrou <solipsis at pitrou.net>:
> On Sat, 12 May 2012 16:29:35 +0200
> Giampaolo Rodolà <g.rodola at gmail.com>
> wrote:
>> http://hg.python.org/cpython/file/9d9495fabeb9/Lib/tarfile.py#l304
>> I discovered this undocumented function by accident different years
>> ago and reused it a couple of times since then.
>> I think that leaving it hidden inside tarfile module is unfortunate.
>> What about moving it into stat module and document it?
>
> I don't know which of stat or shutil would be the better recipient, but
> it's a good idea anyway.

Hmm... right. It's controversial.
On one hand stat module looks better because the "mode" concept is
scattered all over the place, on the other hand this is a perfect
example of file-related "utility" function.
Let's wait in order to collect some bikeshedding then. =)


--- Giampaolo
http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/
http://code.google.com/p/pysendfile/



More information about the Python-ideas mailing list