-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The readme says in the TODO list that x = Int(5); x.set('bad') should error. It does, this has already been fixed.
However you can still set an Int to be a bool, e.g. x = Int(5); x.set(True). This is because isinstance(True, int) == True`. Historical reasons why are given in this SO post.
This should be solved one of two ways:
- Prevent setting an
Intwith a bool value - Convert the bool to int on set
I think either is fine, as long as the reasoning for the choice is detailed in the readme
Metadata
Metadata
Assignees
Labels
No labels