/usr/local/lib/python3.6/site-packages/attr/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/attr/__pycache__/setters.cpython-36.pyc (1470B)
3
8%Egx ã @ sF d Z ddlmZ ddlmZ dd„ Zdd„ Zdd „ Zd
d„ Ze ƒ Z
dS )
z%
Commonly used hooks for on_setattr.
é )Ú_config)ÚFrozenAttributeErrorc s ‡ fdd„}|S )zf
Run all *setters* and return the return value of the last one.
.. versionadded:: 20.1.0
c s" |}xˆ D ]}|| ||ƒ}q
W |S )N© )ÚinstanceÚattribÚ new_valueÚrvÚsetter)Úsettersr ú6/usr/local/lib/python3.6/site-packages/attr/setters.pyÚwrapped_pipe s
zpipe.
.wrapped_piper )r
r r )r
r Úpipe s r
c C s
t ƒ ‚dS )zL
Prevent an attribute to be modified.
.. versionadded:: 20.1.0
N)r )Ú_Ú__Z___r r r Úfrozen s r c C s, t jdkr|S |j}|s|S || ||ƒ |S )z^
Run *attrib*'s validator on *new_value* if it has one.
.. versionadded:: 20.1.0
F)r Z_run_validatorsZ validator)r r r Úvr r r Úvalidate' s
r c C s |j }|r||ƒS |S )z
Run *attrib*'s converter -- if it has one -- on *new_value* and return the
result.
.. versionadded:: 20.1.0
)Ú converter)r r r Úcr r r Úconvert9 s r N)Ú__doc__Ú r Ú
exceptionsr r
r r r ÚobjectZNO_OPr r r r Ú s