On Thu, 21 Feb 2019 at 07:30, Caio Hamamura <[email protected]> wrote:
>
> QgsProcessingAlgorithm needs to implement this useless method 
> (createInstance) in my view of point.
>
> Why do we even need the createInstance method? Couldn’t it be generic:
>
> def createInstance(self):
>     return self.__class__()

QgsProcessingAlgorithm is a c++ class, which has no concept of
metaclasses and so requires subclasses to manually implement this
method.

But it should be possible to bake this into the PyQGIS bindings alone
- see https://github.com/qgis/QGIS/pull/9226

Nyall

>
> Greetings,
> Caio Hamamura
>
> _______________________________________________
> QGIS-Developer mailing list
> [email protected]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to