MCPcopy
hub / github.com/django/django / index

Method index

django/contrib/gis/gdal/feature.py:115–120  ·  view source on GitHub ↗

Return the index of the given field name.

(self, field_name)

Source from the content-addressed store, hash-verified

113 return self[field_name].value
114
115 def index(self, field_name):
116 "Return the index of the given field name."
117 i = capi.get_field_index(self.ptr, force_bytes(field_name))
118 if i < 0:
119 raise IndexError("Invalid OFT field name given: %s." % field_name)
120 return i

Callers 2

__getitem__Method · 0.95
check_ogr_fldMethod · 0.45

Calls 1

force_bytesFunction · 0.90

Tested by

no test coverage detected