Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Functions
attr.filters Namespace Reference

Functions

 _split_what (what)
 
 include (*what)
 
 exclude (*what)
 

Detailed Description

Commonly useful filters for `attrs.asdict` and `attrs.astuple`.

Function Documentation

◆ _split_what()

attr.filters._split_what (   what)
protected
Returns a tuple of `frozenset`s of classes and attributes.

◆ exclude()

attr.filters.exclude ( what)
Create a filter that does **not** allow *what*.

Args:
    what (list[type, str, attrs.Attribute]):
        What to exclude. Can be a type, a name, or an attribute.

Returns:
    Callable:
        A callable that can be passed to `attrs.asdict`'s and
        `attrs.astuple`'s *filter* argument.

.. versionchanged:: 23.3.0 Accept field name string as input argument

◆ include()

attr.filters.include ( what)
Create a filter that only allows *what*.

Args:
    what (list[type, str, attrs.Attribute]):
        What to include. Can be a type, a name, or an attribute.

Returns:
    Callable:
        A callable that can be passed to `attrs.asdict`'s and
        `attrs.astuple`'s *filter* argument.

.. versionchanged:: 23.1.0 Accept strings with field names.