[issue29122] set() bug

2016-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry Styg, but this is the expected behavior. To achieve what you wanted, write this is instead: print list(set(a)) -- nosy: +rhettinger resolution: -> not a bug status: open -> closed ___ Python tracker

[issue29122] set() bug

2016-12-31 Thread Ammar Askar
Ammar Askar added the comment: Why would the expected output be [1, 2, 3]? That is the list notation for having a list that contains the elements 1, 2 and 3. -- nosy: +ammar2 ___ Python tracker ___

[issue29122] set() bug

2016-12-31 Thread styg
New submission from styg: set() method leads to this error: a=[1,2,3,3] b=set(a) print b >> set([1,2,3]) # should be [1,2,3] -- messages: 284402 nosy: styg priority: normal severity: normal status: open title: set() bug type: behavior versions: Python 2.7 ___