strange interaction between open and cwd
Grant Edwards
invalid at invalid.invalid
Mon May 3 14:14:47 EDT 2010
On 2010-05-03, Chris Rebert <clp2 at rebertia.com> wrote:
>> open(path) -> "IOError: [Errno 2] No such file or directory"
>>
>> i think that if the first of these seemingly "impossible" requests fails, it
>> is reasonable to expect that the second one also fails. but the second one
>> (sometimes) doesn't.
>>
>> i think they should always either both succeed, or both fail.
>
> Well, that's Unix and Worse-is-Better[1] for ya. Inelegant
> theoretically,
I don't see how it's inelegant at all. Perhaps it's counter-intuitive
if you don't understand how a Unix filesystem works, but the
underlying filesystem model is very simple, regular, and elegant.
> but probably makes some bit of the OS's job slightly easier and is
> usually good enough in practice. Pragmatism is a bitch sometimes. :-)
--
Grant Edwards grant.b.edwards Yow! ... I'm IMAGINING a
at sensuous GIRAFFE, CAVORTING
gmail.com in the BACK ROOM of a
KOSHER DELI --
More information about the Python-list
mailing list