[issue44640] Typos in error messages of isinstance() & issubclass()

wyz23x2 report at bugs.python.org
Wed Jul 14 13:40:20 EDT 2021


New submission from wyz23x2 <wyz23x2 at 163.com>:

>>> isinstance(2, 1)
Traceback (most recent call last):
  ...
TypeError: isinstance() arg 2 must be a type, a tuple of types or a union
>>> issubclass(int, 1)
Traceback (most recent call last):
  ..
TypeError: issubclass() arg 2 must be a class, a tuple of classes, or a union.

1) It should be "an union", not "a union".
2) The punctuation marks aren't the same -- there's a comma before "or" in issubclass, but not isinstance(). And issubclass()'s ends with a period, which isn't the same with other builtins' messages.

----------
components: Interpreter Core
messages: 397499
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Typos in error messages of isinstance() & issubclass()
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44640>
_______________________________________


More information about the Python-bugs-list mailing list