Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qmtest] Is there a reason why BooleanField does not return boolean objects?


  • To: Mohamed Barwani <mohamedb@xxxxxxx>
  • Subject: Re: [qmtest] Is there a reason why BooleanField does not return boolean objects?
  • From: Stefan Seefeld <stefan@xxxxxxxxxxxxxxxx>
  • Date: Tue, 22 Apr 2008 06:35:19 -0400

Mohamed Barwani wrote:
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?

That's a good question. I believe this is because QMTest used to be much more GUI-centric than it is today, and there isn't a very robust separation between 'Model' and 'View' in QMTest.

Regards,
		Stefan

--
Stefan Seefeld
CodeSourcery
stefan@xxxxxxxxxxxxxxxx
(650) 331-3385 x718