Skip to content

Poorly worded repeated capabilities documentation #1334

@texasaggie97-zz

Description

@texasaggie97-zz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions