On 12/20/2017 8:13 PM, Eric V. Smith wrote:
There is definitely a passive bias towards using types with
dataclasses in that the Eric (the author) doesn't appear to want an
example without them in the pep/docs.
I'm not sure what such an example would look like. Do you mean without
annotations? Or do you mean without specifying the "correct" type, like:
@dataclass
class C:
x: int = 'hello world'
?
Or something else?
Can you provide an example of what you'd like to see?
Re-reading my post you referenced, is it just an example using
typing.Any? I'm okay with that in the docs, I just didn't want to focus
on it in the PEP. I want the PEP to only have the one reference to
typing, for typing.ClassVar. I figure the people reading the PEP can
extrapolate to all of the possible uses for annotations that they don't
need to see a typing.Any example.
Eric.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com