Return the datatype for the property of an object.
518448
def get_datatype(object_type, propid, vendor_id=0):
    """"""
    if _debug: get_datatype._debug("get_datatype %r %r vendor_id=%r", object_type, propid, vendor_id)

    # get the related class
    cls = get_object_class(object_type, vendor_id)
    if not cls:
        return None

    # get the property
    prop = cls._properties.get(propid)
    if not prop:
        return None

    # return the datatype
    return prop.datatype
831377
def _basic_field_data(field, obj):
    """"""
    value = field.value_from_object(obj)
    return {Field.TYPE: FieldType.VAL, Field.VALUE: value}
506823
public static DataType getDataType(Object v) {
        //NOTE: DO NOT CHANGE THE ORDER OF THE IFS!!!
        if(DataType.BOOLEAN.isInstance(v)) {
            return DataType.BOOLEAN;
        }
        else if(DataType.ORDINAL.isInstance(v)) {
            return DataType.ORDINAL;
        }
        else if(DataType.NUMERICAL.isInstance(v)) {
            return DataType.NUMERICAL;
        }
        else if(DataType.CATEGORICAL.isInstance(v)) {
            return DataType.CATEGORICAL;
        }
        else {
            //We will reach this point ONLY if the value is null. 
            //This is because the last enum value in the loop is Categorical which uses the Object class.
            return null; 
        }
    }
1211186
def getTypeStr(_type):
  
  """
  if isinstance(_type, CustomType):
    return str(_type)

  if hasattr(_type, '__name__'):
    return _type.__name__

  return ''
739430
def _value(self, obj, cls=None):
        """"""
        if obj is not None:
            return getattr(obj, self.propname)
        else:
            return getattr(cls, self.propname)
936972
def _convert_property_type(value):
        
        if value in ('true', 'True'):
            return True
        elif value in ('false', 'False'):
            return False
        elif str(value).startswith('{') and str(value).endswith('}'):
            return ast.literal_eval(value)
        else:
            try:
                return int(value)
            except ValueError:
                return value
861598
def getObjectTypeBit(self, t):
        '''
        
        '''
        if isinstance(t, string_types):
            t = t.upper()
            try:
                return self.objectType[t]
            except KeyError:
                raise CommandExecutionError((
                    'Invalid object type "{0}".  It should be one of the following:  {1}'
                    ).format(t, ', '.join(self.objectType)))
        else:
            return t
259653
def db_type(cls, dtype):
        """"""
        if isinstance(dtype, ExtensionDtype):
            return cls.type_map.get(dtype.kind)
        elif hasattr(dtype, 'char'):
            return cls.type_map.get(dtype.char)
458064
function getType(obj) {
  if (obj === null) return 'null';
  if (typeof obj === undefined) return 'undefined';

  return Object.prototype.toString.call(obj)
          .match(/\s([a-zA-Z]+)/)[1]
          .toLowerCase();
}
127047
function isObjectType(sType) {
			var oType = DataType.getType(sType),
				oPrimitiveTypeName = oType && oType.getPrimitiveType().getName();
			return oPrimitiveTypeName === "object" || oPrimitiveTypeName === "any";
		}
350879
public static int getType(Number val) 
  {
    if (val instanceof Integer) 
    {
      return INT;
    } 
    else if (val instanceof Long) 
    {
      return LONG;
    } 
    else if (val instanceof Short) 
    {
      return SHORT;
    } 
    else if (val instanceof Byte) 
    {
      return BYTE;
    } 
    else if (val instanceof Double) 
    {
      return DOUBLE;
    } 
    else if (val instanceof Float) 
    {
      return FLOAT;
    } else
      throw new IllegalArgumentException();
  }
805988
def _get_type(self, obj):
        """"""
        typever = obj['Type']
        typesplit = typever.split('.')
        return typesplit[0] + '.' + typesplit[1]
1051975
def _get_type(cls, ptr):
        """"""

        # fall back to the base class if unknown
        return cls.__types.get(lib.g_base_info_get_type(ptr), cls)
162488
function getCustomProperties(object) {
  var result = {};
  for (var key in object) {
    if (/^x-/.test(key)) {
      result[key] = object[key];
    }
  }
  return result;
}
257156
def get_numeric_type_property(value, is_bytes=False):
    """"""

    obj = unidata.ascii_numeric_type if is_bytes else unidata.unicode_numeric_type

    if value.startswith('^'):
        negated = value[1:]
        value = '^' + unidata.unicode_alias['numerictype'].get(negated, negated)
    else:
        value = unidata.unicode_alias['numerictype'].get(value, value)

    return obj[value]
1252305
function getType(variable) {
        var types = {
            'undefined': 'undefined',
            'number': 'number',
            'boolean': 'boolean',
            'string': 'string',
            '[object Function]': 'function',
            '[object RegExp]': 'regexp',
            '[object Array]': 'array',
            '[object Date]': 'date',
            '[object Error]': 'error'
        };

        return types[typeof variable === 'undefined' ? 'undefined' : _typeof(variable)] || types[{}.toString.call(variable)] || (variable ? 'object' : 'null');
    }
463862
def GetDeviceIntProperty(dev_ref, key):
  """"""
  cf_key = CFStr(key)
  type_ref = iokit.IOHIDDeviceGetProperty(dev_ref, cf_key)
  cf.CFRelease(cf_key)
  if not type_ref:
    return None

  if cf.CFGetTypeID(type_ref) != cf.CFNumberGetTypeID():
    raise errors.OsHidError('Expected number type, got {}'.format(
        cf.CFGetTypeID(type_ref)))

  out = ctypes.c_int32()
  ret = cf.CFNumberGetValue(type_ref, K_CF_NUMBER_SINT32_TYPE,
                            ctypes.byref(out))
  if not ret:
    return None

  return out.value