[QGIS-Developer] Keyword args for python bindings?
Neumann, Andreas
a.neumann at carto.net
Wed Jun 21 23:33:25 PDT 2017
+1
As an occasional Python developer I would welcome this improvement in
readability of the code.
Andreas
On 2017-06-22 04:33, Nyall Dawson wrote:
> Hi all,
>
> Been thinking about this lately, with all the excellent work which is
> being done on sipify and improving the usability of the PyQGIS through
> docstrings and such... do we want to also turn on named argument
> support for PyQGIS methods?
>
> I gather it's just a matter of adding the annotation KeywordArgs=All
> to function definitions. We should be able to code this into sipify to
> handle this automatically.
>
> I'd see the big benefit here would be readability of python code - no
> more someMethod( True,False, 5, None) deciphering!
>
> The downside would be that the argument names would become part of
> stable API. We've still gots lots of unhelpful argument names (things
> like 's', 'c',.... ), so that's a potential downside if these get
> locked in (although maybe we can fix them before freeze).
>
> Thoughts?
> Nyall
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170622/aa116cce/attachment-0001.html>
More information about the QGIS-Developer
mailing list