Skip to content

Commit

Permalink
Add __iter__ for QgsFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Aug 3, 2013
1 parent 8de00c1 commit 20e274a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/core/qgsfeature.sip
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ class QgsFeature

public:

SIP_PYOBJECT __iter__();
%MethodCode
PyObject *attrs = sipConvertFromType( &sipCpp->attributes(), sipType_QgsAttributes, Py_None );
sipRes = PyObject_GetIter(attrs);
%End

SIP_PYOBJECT __getitem__(int key);
%MethodCode
const QgsAttributes& attrs = sipCpp->attributes();
Expand Down

0 comments on commit 20e274a

Please sign in to comment.