Dealing with dicts in doctest
Serhiy Storchaka
storchaka at gmail.com
Fri Jul 6 03:09:36 EDT 2018
05.07.18 20:57, Steven D'Aprano пише:
> I think that's really clever. Is it too clever? How do you deal with
> dicts in doctests?
There was a proposition for adding a doctest option for
order-insensitive matching (like NORMALIZE_WHITESPACE and ELLIPSIS). But
it was rejected because there is a simple alternative:
>>> func(1) == {'a': 1, 'b': 2, 'c': 3}
True
And since 3.7 the need of this feature was reduced.
More information about the Python-list
mailing list