Hong Xu added the comment:
Should we update the document at least? The document doesn't mention
NotADirectoryError or its super classes at all.
--
___
Python tracker
<https://bugs.python.org/is
Change by Hong Xu :
--
title: Inconsistent exceptions thrown by mkdir on different OSes ->
Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes
___
Python tracker
<https://bugs.python.org/issu
Change by Hong Xu :
--
title: Inconsistent exception thrown by mkdir on different OSes -> Inconsistent
exceptions thrown by mkdir on different OSes
___
Python tracker
<https://bugs.python.org/issu
New submission from Hong Xu :
Consider the following code:
-
import pathlib
def main():
pathlib.Path('tmp').touch()
pathlib.Path('tmp/tmp_sub').mkdir(parents=True)
main()
Run the code above in an empty dire
Change by Hong Xu :
--
pull_requests: +14719
pull_request: https://github.com/python/cpython/pull/14950
___
Python tracker
<https://bugs.python.org/issue24
Hong Xu added the comment:
Thanks for your answer, but I believe this is a real document bug. OSError does
have its signature documented, but the majority of other exception classes do
not do so, neither does BaseException explains a default behavior clearly (see
my quote above).
As an
New submission from Hong Xu :
The "Builtin Exceptions" page does not document the constructors of the listed
exception classes. All it says is
> The tuple of arguments given to the exception constructor. Some built-in
> exceptions (like OSError) expect a certain number