[nitpicking one specific point]
In article ,
Steven D'Aprano wrote:
>
>On the other hand a cmp function is specific to sorting, and nothing
>but sorting.
Not quite. cmp() is useful any time you have an expensive comparison
operation and you need to take three different codepaths depending on
t
On Wed, 12 May 2010 19:04:47 +, kj wrote:
> In Terry Reedy
> writes:
>
>>On 5/11/2010 3:49 PM, kj wrote:
>>> PS: I never understood why os.walk does not support hooks for key
>>> events during such a tree traversal.
>
>>Either 1) it is intentionally simple, with the expectation that people
On 5/12/2010 2:52 PM, kj wrote:
In Tim Chase writes:
05/11/2010 09:07 PM, Terry Reedy wrote:
If os.walk were rewritten, it should be as an iterator (generator).
Directory entry and exit functions could still be added as params.
It *is* an iterator/generator. However, I suspect you mean t
On May 12, 2:04 pm, kj wrote:
> It seems that a similar "simplicity argument" was invoked
> to strip the cmp option from sort in Python 3. G. Simplicity
> is great, but when the drive for it starts causing useful functionality
> to be thrown out, then it is going too far. Yes, I know that i
In Terry Reedy
writes:
>On 5/11/2010 3:49 PM, kj wrote:
>> PS: I never understood why os.walk does not support hooks for key
>> events during such a tree traversal.
>Either 1) it is intentionally simple, with the expectation that people
>would write there own code for more complicated uses or
In Tim Chase writes:
> 05/11/2010 09:07 PM, Terry Reedy wrote:
>> If os.walk were rewritten, it should be as an iterator (generator).
>> Directory entry and exit functions could still be added as params.
>It *is* an iterator/generator. However, I suspect you mean that
>it should slurp the dirs
05/11/2010 09:07 PM, Terry Reedy wrote:
PS: I never understood why os.walk does not support hooks for key
events during such a tree traversal.
Either 1) it is intentionally simple, with the expectation that people
would write there own code for more complicated uses or 2) no one has
submitted
On 5/11/2010 3:49 PM, kj wrote:
I want implement a function that walks through a directory tree
and performs an analsysis of all the subdirectories found. The
task has two essential requirements that, AFAICT, make it impossible
to use os.walk for this:
1. I need to be able to prune certain d
In Tim Chase
writes:
>That said, the core source for os.walk() is a whole 23
>lines of code, it's easy enough to just clone it and add what you
>need...
Thanks, that was a good idea.
~K
--
http://mail.python.org/mailman/listinfo/python-list
On 05/11/2010 02:49 PM, kj wrote:
I want implement a function that walks through a directory tree
and performs an analsysis of all the subdirectories found. The
task has two essential requirements that, AFAICT, make it impossible
to use os.walk for this:
1. I need to be able to prune certain di
I want implement a function that walks through a directory tree
and performs an analsysis of all the subdirectories found. The
task has two essential requirements that, AFAICT, make it impossible
to use os.walk for this:
1. I need to be able to prune certain directories from being visited.
2.
11 matches
Mail list logo