Undefined behaviour in C [was Re: The Cost of Dynamism]
Rustom Mody
rustompmody at gmail.com
Sun Mar 27 01:02:18 EDT 2016
More information about the Python-list mailing list
Sun Mar 27 01:02:18 EDT 2016
- Previous message (by thread): Undefined behaviour in C [was Re: The Cost of Dynamism]
- Next message (by thread): Undefined behaviour in C [was Re: The Cost of Dynamism]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sunday, March 27, 2016 at 2:15:22 AM UTC+5:30, Terry Reedy wrote: > On 3/26/2016 1:43 PM, Rustom Mody wrote: > > > There is this nice piece of OO called the exception hierarchy: > > > https://docs.python.org/2/library/exceptions.html#exception-hierarchy > > https://docs.python.org/3/library/exceptions.html#exception-hierarchy > > > BaseException ⊇ Exception ⊇ EnvironmentError ⊇ IOError > > BaseException ⊇ Exception ⊇ ⊇ OSError > > > At this point it would have been completely natural for IOError to continue > > subclassing to all the typical errors > > - File not found > > - No Space left on device > > Which is why we now have > > +-- OSError > | +-- BlockingIOError > | +-- ChildProcessError > | +-- ConnectionError > | | +-- BrokenPipeError > | | +-- ConnectionAbortedError > | | +-- ConnectionRefusedError > | | +-- ConnectionResetError > | +-- FileExistsError > | +-- FileNotFoundError > | +-- InterruptedError > | +-- IsADirectoryError > | +-- NotADirectoryError > | +-- PermissionError > | +-- ProcessLookupError > | +-- TimeoutError > > 'no space' is MemoryError, but that is a hardward, not OS matter. > > > But instead we have an integer errno and we must inquire what that is to > > figure out what the exact IOError was > > This statement is obsolete, but explains why the above was added in 3.3. Thanks Terry for the correction I had an impression of seeing some discussion on this and resolved not to incorporate. Glad to be wrong on that However my general point is hardly about errno but about the lineage/legacy of python. And this is only strengthened by your correction Thanks to American politics being in the air I learnt a new word the other day: 'birther'. My point is python is 'birthed' in Unix-land
- Previous message (by thread): Undefined behaviour in C [was Re: The Cost of Dynamism]
- Next message (by thread): Undefined behaviour in C [was Re: The Cost of Dynamism]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list