Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P621
stylish poll
Active
Public
Actions
Authored by
douardda
on Mar 20 2020, 12:18 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
Do you prefer:
@attr.s(frozen=True)
class Person(BaseModel):
"""Represents the author/committer of a revision or release."""
fullname = attr.ib(type=bytes, validator=type_validator())
name = attr.ib(type=Optional[bytes], validator=type_validator())
email = attr.ib(type=Optional[bytes], validator=type_validator())
or
@attr.s(frozen=True)
class Person(BaseModel):
"""Represents the author/committer of a revision or release."""
fullname = attr.ib(type=bytes)
name = attr.ib(type=Optional[bytes])
email = attr.ib(type=Optional[bytes])
fullname.validator(type_validator())
name.validator(type_validator())
email.validator(type_validator())
Event Timeline
douardda
created this paste.
Mar 20 2020, 12:18 PM
2020-03-20 12:18:37 (UTC+1)
douardda
edited the content of this paste.
(Show Details)
Mar 20 2020, 12:26 PM
2020-03-20 12:26:03 (UTC+1)
Log In to Comment