def price(*args, **kwargs):
kwargs.setdefault('<STR_LIT:default>', '<STR_LIT>')<EOL>kwargs.setdefault('<STR_LIT>', price_converter)<EOL>if '<STR_LIT>' in kwargs:<EOL><INDENT>validator = kwargs.pop('<STR_LIT>')<EOL>if not isinstance(validator, (tuple, list)):<EOL><INDENT>validator = [validator]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>validator = []<EOL><DEDENT>validator.append(instance_of(PriceClass))<EOL>return attr.ib(validator=validator, *args, **kwargs)<EOL>
Price field for attrs.

    See `help(attr.ib)` for full signature.

    Usage:

        >>> from pricing import fields
        ... @attr.s
        ... class Test:
        ...     price: Price = fields.price(default='USD 5.00')
        ...
        ... Test()
        Test(price=USD 5.00)