[QGIS-Developer] FeatureIterator Python question

matteo matteo.ghetta at gmail.com
Fri Sep 15 06:44:21 PDT 2017


Hi Andreas,

if I'm not wrong the next method is not been removed, it is a python 3 *fix*

https://stackoverflow.com/questions/1073396/is-generator-next-visible-in-python-3-0

so instead of:

it = layer.getFeatures()
it.next()

just type

it = layer.getFeatures()
next(it)

Matteo


More information about the QGIS-Developer mailing list