"Daniel Dittmar" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

> Duncan Booth wrote:
>>  I would have expected a
>> path object to be a sequence of path elements rather than a sequence of
>> characters.

Glad I'm not the only oddball.

> Maybe it's nitpicking, but I don't think that a path object should be a
> 'sequence of path elements' in an iterator context.
>
> This means that
>
> for element in pathobject:
>
> has no intuitive meaning for me, so it shouldn't be allowed.

????  The internal equivalent of (simplified, omitting error checking, 
etc.)

for dir in pathobject:
  if isdir(dir): cd(dir)

*is*, in essence, what the OS mainly does with paths (after splitting the 
string representation into pieces).

Directory walks also work with paths as sequences (stacks, in particular).

Terry J. Reedy



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to