[issue38853] set.repr breaches docstring contract

2019-11-20 Thread Cat Chenal
Cat Chenal added the comment: Thank you for pointing out my lack of clarity: I apologize. I probably should not have split this issue in two (issue38855). My confusion stems from the fact that I expected the unpacking of a set to return the same output as that obtained from the unpacking

[issue38855] test_unpack.py does not catch the unpacking of a set

2019-11-19 Thread Cat Chenal
New submission from Cat Chenal : S = {19,8,-1,25,0,1,2,3,4,5,6,7} a, *b, c = S print('a:', a) print('b:', b) print('c:', c) Output: a: 0 b: [1, 2, 3, 4, 5, 6, 7, 8, 19, 25] c: -1 Either test_unpack.py needs a test for "non-indexable object" to prevent this unpacking of a no

[issue38853] set.repr breaches docstring contract

2019-11-19 Thread Cat Chenal
New submission from Cat Chenal : 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