datarepr

Minor Version:

Introduction

This project allows to store the arguments for callables.

Installation
Features
datarepr.datarepr(name: Any, /, *args: Any, **kwargs: Any) -> str

This function allows for common sense representation.

It is implemented as follows:

def datarepr(name: Any, /, *args: Any, **kwargs: Any) -> str:
    "This function allows for common sense representation."
    parts = list()
    for a in args:
        parts.append(repr(a))
    for i in kwargs.items():
        parts.append("%s=%r" % i)
    content = ", ".join(parts)
    ans = "%s(%s)" % (name, content)
    return ans
datarepr.oxford(*args: Any, conj: Any = "and", default: Any = "") -> Any

This function returns a string coordination of args using the given conjunction. The Oxford comma is used for more than two args. If no args are given, then the function returns default.

Added in version 1.1.

datarepr.test() -> unittest.TextTestResult
License
Impressum