Operands must be aware of the datatypes they can represent
Registered by
Gustavo Narea
Booleano supports four data types: Boolean, string, number and set. Operands must be aware of the data type(s) they can represent, so this information can be used by the Booleano function calls.
They should define the .datatypes attribute and the Operand class must provide three methods for that attribute: .is_boolean(), .is_string(), .is_number(), .is_set(). The operands then must implement the methods to return their value in each of the advertised datatypes (like .to_python(): to_boolean(), to_string(), to_number() and to_set()).
Blueprint information
- Status:
- Complete
- Approver:
- Gustavo Narea
- Priority:
- Essential
- Drafter:
- Gustavo Narea
- Direction:
- Approved
- Assignee:
- Gustavo Narea
- Definition:
- Approved
- Series goal:
- Accepted for trunk
- Implementation:
- Implemented
- Milestone target:
- 1.0a2
- Started by
- Gustavo Narea
- Completed by
- Gustavo Narea
Related branches
Related bugs
Sprints
Whiteboard
According to the UML class diagram, this will be implemented as interfaces. Of course, for Python implementations, they'll be (abstract) classes.
(?)