Serhiy Storchaka <[email protected]> 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 <[email protected]>
<https://bugs.python.org/issue39391>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com