[Python-Dev] Is static typing still optional?
chris.barker at noaa.gov
Tue Dec 26 13:49:53 EST 2017
On Sat, Dec 23, 2017 at 5:54 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> I still wonder about the "fields *must* be annotated" constraint though. I
> can understand a constraint that the style be *consistent* (i.e. all fields
> as annotations, or all fields as field instances), since that's needed to
> determine the field order, but I don't see the problem with the "no
> annotations" style otherwise.
IIUC, without annotations, there is no way to set a field with no default.
And supporting both approaches violates "only one way to do it" in, I
think, a confusing manner -- particularly if you can't mix and match them.
Also, could does using class attributes without annotations make a mess
when subclassing? -- no I haven't thought that out yet.
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev