Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
attr._make.Factory Class Reference

Public Member Functions

 __init__ (self, factory, takes_self=False)
 
 __getstate__ (self)
 
 __setstate__ (self, state)
 

Public Attributes

 factory
 
 takes_self
 

Detailed Description

Stores a factory callable.

If passed as the default value to `attrs.field`, the factory is used to
generate a new value.

Args:
    factory (typing.Callable):
        A callable that takes either none or exactly one mandatory
        positional argument depending on *takes_self*.

    takes_self (bool):
        Pass the partially initialized instance that is being initialized
        as a positional argument.

.. versionadded:: 17.1.0  *takes_self*

Member Function Documentation

◆ __getstate__()

attr._make.Factory.__getstate__ (   self)
Play nice with pickle.

◆ __setstate__()

attr._make.Factory.__setstate__ (   self,
  state 
)
Play nice with pickle.

The documentation for this class was generated from the following file: