On Mon, Apr 11, 2022 at 11:53:18AM -0500, Eryk Sun wrote: > On 4/11/22, Steven D'Aprano <st...@pearwood.info> wrote: > > > > You know how every OS process has its own working directory? Just like > > that, except every module. > > A per-thread working directory makes more sense to me.
Hmmm, yes, that does seem sensible. > But it would be > a lot of work to implement support for this in the os and io modules, > for very little gain. Sure. > > "One WD per process" is baked so deep into file I/O on Posix > > systems (and I presume Windows) that its probably impossible to > > implement in current systems. > > Windows has up to 27 working directories per process. There's the > overall working directory directory, plus one for each drive. Today I learned something new, thank you. How does that work in practice? In Windows, if you just say the equivalent to `open('spam')`, how does the OS know which drive and WD to use? -- Steve _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/2A7YYS72ILRJKQTR3UU44HDTC4UYPA23/ Code of Conduct: http://python.org/psf/codeofconduct/