Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#1885 closed defect (fixed)

OGR Features don't have a 'keys()', 'items()' interface

Reported by: crschmidt Owned by: hobu
Priority: normal Milestone: 1.5.0
Component: SWIG (all bindings) Version: unspecified
Severity: normal Keywords:
Cc: warmardam

Description

It would be nice to be able to do:

for key, value in feature.items():

print key, value

in Python.

for key in feature.keys() would be handy as well.

If neither of these is possible, a method to return a list of the keys which can be passed to getattr:

getattr(feature, key)

ould be good.

Change History (2)

comment:1 by hobu, 17 years ago

Resolution: fixed
Status: newclosed

Added in r12312

comment:2 by hobu, 17 years ago

Milestone: 1.5.0
Note: See TracTickets for help on using tickets.