pywin32 icon indicating copy to clipboard operation
pywin32 copied to clipboard

Update CoClassBaseClass repr to not always include None as a submodule

Open Avasam opened this issue 8 months ago • 0 comments

Extracted from https://github.com/mhammond/pywin32/pull/2555

__doc__ will always be None because it references com/win32com/client/__init__.py's docstring (I believe this class was part of the gen_py generation a long time ago).

Before:

>>> from win32com.client import gencache
>>> repr(gencache.EnsureModule("{6BCDCB60-5605-11D0-AE5F-CADD4C000000}", 0, 1, 1).ArrayTest())
'<win32com.gen_py.None.ArrayTest>'

After:

>>> from win32com.client import gencache
>>> repr(gencache.EnsureModule("{6BCDCB60-5605-11D0-AE5F-CADD4C000000}", 0, 1, 1).ArrayTest())
'<win32com.gen_py.6BCDCB60-5605-11D0-AE5F-CADD4C000000x0x1x1.ArrayTest>'

Avasam avatar Apr 19 '25 18:04 Avasam