Skip to content

Commit 20e274a

Browse files
committed
Add __iter__ for QgsFeature
1 parent 8de00c1 commit 20e274a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/core/qgsfeature.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ class QgsFeature
116116

117117
public:
118118

119+
SIP_PYOBJECT __iter__();
120+
%MethodCode
121+
PyObject *attrs = sipConvertFromType( &sipCpp->attributes(), sipType_QgsAttributes, Py_None );
122+
sipRes = PyObject_GetIter(attrs);
123+
%End
124+
119125
SIP_PYOBJECT __getitem__(int key);
120126
%MethodCode
121127
const QgsAttributes& attrs = sipCpp->attributes();

0 commit comments

Comments
 (0)