[Qgis-developer] attributeMap vs. attributes
Sandro Santilli
strk at keybit.net
Tue Feb 19 03:06:44 PST 2013
On Tue, Feb 19, 2013 at 08:54:55PM +1000, Nathan Woodrow wrote:
> Why not just hide it using Python method overriding:
>
> QgsVectorLayer.attributeMap = QgsVectorLayer.attributes
>
> Then you can just call attributesMap()[] and it will call
> QgsVectorLayer.attributes for you.
I guess you meant QgsFeature.
Didn't work, anyway:
line 102, in doRemEdgeModFace
edge_id = feature.attributeMap()[edge_id_fno].toInt()[0]
TypeError: QgsFeature.attributes(): first argument of unbound method must have type 'QgsFeature'
is attributes() a free function rather than a method ?
--strk;
More information about the Qgis-developer
mailing list