Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P613
(An Untitled Masterwork)
Active
Public
Actions
Authored by
douardda
on Mar 12 2020, 3:33 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
def attrib_typecheck(default: Any = attr.NOTHING,
type: Optional[Type] = None,
validator: Collection[Callable] = ()):
"A 'partial' of attr.ib that prefill the validator with type_validator"
return attr.attrib(
default=default,
type=type,
validator=[type_validator(), *validator])
Event Timeline
douardda
created this paste.
Mar 12 2020, 3:33 PM
2020-03-12 15:33:34 (UTC+1)
Log In to Comment