Hi,
Suppose we have a dict
Dic = { True: 'yes', 1: 'No'}
According to the Python 3 documentation, the keys must have a unique value
so True is converted to integer because of the type coercion (boolean are
subtype of integer) so boolean are winded to integer to be compared.
Am I missing something?
If that's what happen, why when running Dic.items() it return [(True,
'No')] instead of [(1, 'No')]
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor