Return an attribute with a name and no other bells and whistles.
(
name,
default=NOTHING,
validator=None,
repr=True,
eq=True,
hash=None,
init=True,
converter=None,
kw_only=False,
inherited=False,
)
| 37 | |
| 38 | |
| 39 | def simple_attr( |
| 40 | name, |
| 41 | default=NOTHING, |
| 42 | validator=None, |
| 43 | repr=True, |
| 44 | eq=True, |
| 45 | hash=None, |
| 46 | init=True, |
| 47 | converter=None, |
| 48 | kw_only=False, |
| 49 | inherited=False, |
| 50 | ): |
| 51 | class="st">""" |
| 52 | Return an attribute with a name and no other bells and whistles. |
| 53 | class="st">""" |
| 54 | return Attribute( |
| 55 | name=name, |
| 56 | default=default, |
| 57 | validator=validator, |
| 58 | repr=repr, |
| 59 | cmp=None, |
| 60 | eq=eq, |
| 61 | hash=hash, |
| 62 | init=init, |
| 63 | converter=converter, |
| 64 | kw_only=kw_only, |
| 65 | inherited=inherited, |
| 66 | alias=_default_init_alias_for(name), |
| 67 | alias_is_default=True, |
| 68 | ) |