nimi-python icon indicating copy to clipboard operation
nimi-python copied to clipboard

Poorly worded repeated capabilities documentation

Open texasaggie97-zz opened this issue 4 years ago • 0 comments

Description of issue

While working on #1290, a comment about how the repeated capabilities text in documentation was poor:

.. py:attribute:: nidigital.Session.sites[]
        If no prefix is added to the items in the parameter, the correct prefix will be added when
        the driver function call is made.

This phrase implies that the user knows about the underlying C API and describes an implementation detail.

Python users should not need to know nor care nor have us confuse them with hthis. I'd even argue that if documentation just told them how to use the basic tuple of numbers way we'd be fine.

Also: session.sites[0,1].channel_enabled = True

The above would be more "Pythonic"

And:

        passes a string of :python:`'site0, site1, site2'` to the set attribute function.

        If an invalid repeated capability is passed to the driver, the driver will return an error.

        You can also explicitly use the prefix as part of the parameter, but it must be the correct prefix
        for the specific repeated capability.

I'd get rid of all this. It's good for the contributor to know but not for the user.

texasaggie97-zz avatar Mar 19 '20 16:03 texasaggie97-zz