[New-bugs-announce] [issue46974] set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not

PiTeR report at bugs.python.org
Thu Mar 10 09:07:15 EST 2022


New submission from PiTeR <pio.paluchowski at wp.pl>:

set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not
to find this bug, sometimes you need to display the result several times
example code:
def tupla():
    import random
    ilosc = random.randint(0,49)
    n=0
    lista=[]
    i=0
    while True:
        n = random.randint(1,100)
        lista.append(n)
        i=i+1
        if i==ilosc-1:
            break
    lista = set(lista)
    list(lista)
    print(lista)

----------
components: Windows
files: bug_1.PNG
messages: 414848
nosy: paul.moore, pio.paluchowski, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: set function for lists on numbers, sometimes sorts elements from smallest to largest, and sometimes not
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file50666/bug_1.PNG

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


More information about the New-bugs-announce mailing list