
Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment: You will get the same problem for common idiom of using a singleton for optional parameters without default value. _singleton = object() def get(key, default=_signleton): if default is _signleton: ... And for other objects whos repr contains "at 0x...". And even more complex problem with sets. When test the pydoc output, ignore non-deterministic parts. For example, doctest allows you to use a placeholder.
C() #doctest: +ELLIPSIS <__main__.C instance at 0x...>
---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39391> _______________________________________