Is there a reason why BooleanField does not return boolean objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there a reason why BooleanField does not return boolean objects?



class BooleanField(EnumerationField):
    """A field containing a boolean value.

    The enumeration contains two values: true and false."""

    def __init__(self, name = "", default_value = None, **properties):

        # Construct the base class.
        EnumerationField.__init__(self, name, default_value,
                                  ["true", "false"], **properties)
^^____^^ both are strings not bolean objects. Why?

cheers
--
Mohamed Barwani
ASGQA
"The greatest challenge to any thinker is stating the problem in a way that will allow a solution."
    - Bertrand Russell