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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4