Imagine if one process had the ownership of a file descriptor for its entire lifetime. You couldn't open a file in two editors or synchronize content between a writer or a reader. You couldn't even open a file to have multiple writers. Unix pipes wouldn't probably work as well.
If you need lock everyone else out, that should definitely be an explicit request.
There's no real cost to have multiple readers so why block it by default? Locking is needed with multiple writers
My best guess - Athe operating system level it is valid to open a file more than once. So there isn’t a reason for Python to prevent it either.
Exactly David.
Imagine if one process had the ownership of a file descriptor for its entire lifetime. You couldn't open a file in two editors or synchronize content between a writer or a reader. You couldn't even open a file to have multiple writers. Unix pipes wouldn't probably work as well.
If you need lock everyone else out, that should definitely be an explicit request.
There's no real cost to have multiple readers so why block it by default? Locking is needed with multiple writers
Thank you for sharing this✌