<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _loadFromRow(self, result, fields, cursor):
 """Load from a database row, described by fields. ``fields`` should be the attribute names that will be set. Note that userclasses will be created (but not loaded). """

        position = 0
        for elem in fields:
            value = result[position]
            valueType = cursor.description[position][1]
            if hasattr(self._dbModule, 'BOOLEAN') and \
                       valueType == self._dbModule.BOOLEAN and \
                       (value is not True or value is not False):
                # convert to a python boolean
                value = value and True or False
            if value and self._userClasses.has_key(elem):
                userClass = self._userClasses[elem]
                # create an instance
                value = userClass(value)

            self._values[elem] = value
            position += 1