You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If skipkeys is false (the default), a TypeError will be raised when trying to encode keys that are not str, int, float or None. If skipkeys is true, such items are simply skipped.
However, boolean values (True and False) can be used as dictionary keys without raising a TypeError. I think this is a mistake.
Thank you, I understand. I noticed that the description of json.dump includes bool. It would be better to keep it consistent.
skipkeys (bool) – If True, keys that are not of a basic type (str, int, float, bool, None) will be skipped instead of raising a TypeError. Default False.
However, boolean values (True and False) can be used as dictionary keys without raising a TypeError. I think this is a mistake.
Linked PRs
The text was updated successfully, but these errors were encountered: