## Feature Right now `OSError` has a standard `__new__`, which is not correct. Because it is a special case in CPython: ```python >>> OSError() OSError() >>> OSError(1) OSError(1) >>> OSError(1, 2) PermissionError(1, 2) ``` RustPython: ```python >>>>> OSError() # ok OSError() >>>>> OSError(1) # ok OSError(1) >>>>> OSError(1, 2) # error OSError(1, 2) ``` ## Python Documentation Source code: https://github.com/python/cpython/blob/ecc3c8e4216958d85385bf2467441c975128f26c/Objects/exceptions.c#L991-L1003 Related #2897 Related #2771
Activity