[New-bugs-announce] [issue41811] pstats.SortKey enum is broken

Ethan Furman report at bugs.python.org
Sat Sep 19 04:49:31 EDT 2020


New submission from Ethan Furman <ethan at stoneleaf.us>:

Currently, __new__ creates each member as an empty string, then adds the _value_ attribute.  Because of this, each member is equal to each other, and all appear the same to any data structure that relies on equality and hash as distinguishers (so, basically, all of them).

The fix is to use the first value as the string to be created.

----------
assignee: ethan.furman
components: Library (Lib)
messages: 377153
nosy: ethan.furman
priority: normal
severity: normal
status: open
title: pstats.SortKey enum is broken
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

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


More information about the New-bugs-announce mailing list