bastikr / boolean.py

Implements boolean algebra in one module.
BSD 2-Clause "Simplified" License
78 stars 34 forks source link

Consider dropping custom Python operators #71

Open pombredanne opened 7 years ago

pombredanne commented 7 years ago

@Kronuz @bastikr I am not sure that I have a need to build boolean expression using overloaded operators in Python and this introduces subtle bias and behaviors in many places.

Do you have a use for them? (as opposed to build an expression from a parsed string or building an expression from nested Python objects)

This would mean dropping the dunder methods from here: https://github.com/bastikr/boolean.py/blob/3746d222ee963a9f55c9cfa0322f17132de92b00/boolean/boolean.py#L730

__and__ , __mul__ , __invert__ , __or__ and __add__ and possibly __nonzero__ and __bool__

pombredanne commented 7 years ago

This would eventually keep the python boolean logic completely separate from this library boolean logic.

pombredanne commented 7 years ago

Alternatively, this could be something that could be made optional and not available on a systematic basis.

pombredanne commented 7 years ago

Ping? any feedback on this?