Closed PFython closed 4 years ago
Aliases for True/False in __str__. Given that 1, 1.0, and True are considered equivalent as dictionary keys, it would be helpfully explicit to create all possibilities as aliases regardless of which Key is given initially. Likewise False.
__str__
1
1.0
True
False
>>> x = CleverDict({True: "Is this?"}) >>> print(x) CleverDict x[True] == x['_True'] == x._True == x[1] == x[1.0] == 'Is this?'
Closed in version 1.5 and higher.
Aliases for True/False in
__str__
. Given that1
,1.0
, andTrue
are considered equivalent as dictionary keys, it would be helpfully explicit to create all possibilities as aliases regardless of which Key is given initially. LikewiseFalse
.