[New-bugs-announce] [issue38853] set.repr breaches docstring contract

Cat Chenal report at bugs.python.org
Tue Nov 19 16:27:41 EST 2019


New submission from Cat Chenal <catchenal at gmail.com>:

S = {19,8,-1,25,0,1,2,3,4,5,6,7}
print('Set S = {{19,8,-1,25,0,1,2,3,4,5,6,7}}')

The set is represented by a new string-ordered set:
print(f'Its repr is:\n{S}\n')
Output:
{0, 1, 2, 3, 4, 5, 6, 7, 8, 19, 25, -1}

This is a breach of the contract stated in the docstring: "Build an unordered collection of unique elements."

----------
components: ctypes
messages: 356991
nosy: Ylem
priority: normal
severity: normal
status: open
title: set.repr breaches docstring contract
type: behavior
versions: Python 3.6

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


More information about the New-bugs-announce mailing list