def __init__(self, type, name, has_default, default=None,
               order=None,names=None, doc=None, other_props=None):
    # Ensure valid ctor args
    if not name:
      fail_msg = 'Fields must have a non-empty name.'
      raise SchemaParseException(fail_msg)
    elif not isinstance(name, basestring):
      fail_msg = 'The name property must be a string.'
      raise SchemaParseException(fail_msg)
    elif order is not None and VALID_FIELD_SORT_ORDERS not in order:
      fail_msg = 'The order property %s is not valid.' % order
      raise SchemaParseException(fail_msg)

    # add members
    self._props = {}
    self._has_default = has_default
    self._props.update(other_props or {})

    if (isinstance(type, basestring) and names is not None
        and names.has_name(type, None)):
      type_schema = names.get_name(type, None)
    else:
      try:
        type_schema = make_avsc_object(type, names)
      except Exception, e:
        fail_msg = 'Type property "%s" not a valid Avro schema: %s' % (type, e)
        raise SchemaParseException(fail_msg)
    self.set_prop('type', type_schema)
    self.set_prop('name', name)
    self.type = type_schema
    self.name = name
    # TODO(hammer): check to ensure default is valid
    if has_default: self.set_prop('default', default)
    if order is not None: self.set_prop('order', order)
    if doc is not None: self.set_prop('doc', doc)

  # read-only properties
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/avro-1.7.6/src/avro/schema.py/Field.__init__/swapped operands of `not in`