Repository: scipy/scipy
File: scipy/stats/_distribution_infrastructure.py (Python)

Code before:

        `make_distribution` does not work perfectly with all instances of
        `rv_continuous`. Known failures include `levy_stable` and `vonmises`,
        and some methods of some distributions will not support array shape
        parameters.

    Parameters
    ----------
    dist : `rv_continuous`
        Instance of `rv_continuous` OR an instance of any class with the following
        attributes:

        __make_distribution_version__ : str
            A string containing the version number of SciPy in which this interface
            is defined. The preferred interface may change in future SciPy versions,
            in which case support for an old interface version may be deprecated
            and eventually removed.
        parameters : dict
            A dictionary describing the parameters of the distribution.
            Each key is the name of a parameter,
            and the corresponding value is itself a dictionary with the following items.

            endpoints : tuple
                A tuple defining the lower and upper endpoints of the domain of the
                parameter; allowable values are floats, the name (string) of another
                parameter, or a callable taking parameter names as keyword only
                arguments and returning the numerical value of an endpoint for
                given parameter values.

            inclusive : tuple of bool
                A tuple specifying whether the endpoints are included within the domain
                of the parameter.

        support : dict
            A dictionary describing the support of the distribution. It has items
            "endpoints" and "inclusive" with the same structure as the matching
            items in the values of the parameters dict described above.

        The class **must** also define a ``pdf`` method and **may** define methods
        ``logentropy``, ``entropy``, ``median``, ``mode``, ``logpdf``,
        ``logcdf``, ``cdf``, ``logccdf``, ``ccdf``,
        ``ilogcdf``, ``icdf``, ``ilogccdf``, and ``iccdf``.
        If defined, these methods must accept the parameters of the distributions as
        keyword arguments and also accept any positional-only arguments accepted by
        the corresponding method of `ContinuousDistribution`. Methods ``moment_raw``,
        ``moment_central``, ``moment_standardized`` may also be defined; if so,
        they must accept the ``order`` of the moment by position, accept all
        distribution parameters by keyword, and return the raw, central, and
        standardized moments of the distribution, respectively.

    Returns

Review comment (suggestion):
Either way is ambiguous because a "keyword argument" is essentially key-value pair, and we're only identifying one half of that, but I think this is more clear:
```suggestion
                parameter, or a callable taking parameters as keyword only
```

Code after:

    .. note::

        `make_distribution` does not work perfectly with all instances of
        `rv_continuous`. Known failures include `levy_stable` and `vonmises`,
        and some methods of some distributions will not support array shape
        parameters.

    Parameters
    ----------
    dist : `rv_continuous`
        Instance of `rv_continuous` OR an instance of any class with the following
        attributes:

        __make_distribution_version__ : str
            A string containing the version number of SciPy in which this interface
            is defined. The preferred interface may change in future SciPy versions,
            in which case support for an old interface version may be deprecated
            and eventually removed.
        parameters : dict
            A dictionary describing the parameters of the distribution.
            Each key is the name of a parameter,
            and the corresponding value is itself a dictionary with the following items.

            endpoints : tuple
                A tuple defining the lower and upper endpoints of the domain of the
                parameter; allowable values are floats, the name (string) of another
                parameter, or a callable taking parameters as keyword only
                arguments and returning the numerical value of an endpoint for
                given parameter values.

            inclusive : tuple of bool
                A tuple specifying whether the endpoints are included within the domain
                of the parameter.

        support : dict
            A dictionary describing the support of the distribution. It has items
            "endpoints" and "inclusive" with the same structure as the matching
            items in the values of the parameters dict described above.

        The class **must** also define a ``pdf`` method and **may** define methods
        ``logentropy``, ``entropy``, ``median``, ``mode``, ``logpdf``,
        ``logcdf``, ``cdf``, ``logccdf``, ``ccdf``,
        ``ilogcdf``, ``icdf``, ``ilogccdf``, and ``iccdf``.
        If defined, these methods must accept the parameters of the distributions as
        keyword arguments and also accept any positional-only arguments accepted by
        the corresponding method of `ContinuousDistribution`. Methods ``moment_raw``,
        ``moment_central``, ``moment_standardized`` may also be defined; if so,
        they must accept the ``order`` of the moment by position, accept all
        distribution parameters by keyword, and return the raw, central, and
        standardized moments of the distribution, respectively.