On 19 Dec. 2017 7:00 am, "Chris Barker" <[email protected]> wrote:
Are there other options??
plain old:
@dataclass
class C:
a = 1
b = 1.0
would work, though then there would be no way to express fields without
defaults:
The PEP already supports using "a = field(); b = field()" (etc) to declare
untyped fields without a default value.
This annotation free spelling may not be clearly covered in the current
module docs, though.
Cheers,
Nick.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com