Re: [Python-Dev] Is static typing still optional?

2017年12月10日 13:40:42 -0800

On 12/10/2017 4:29 PM, Ivan Levkivskyi wrote:
On 10 December 2017 at 22:24, Raymond Hettinger <[email protected] <mailto:[email protected]>> wrote:
 Without typing (only the first currently works):
   Point = namedtuple('Point', ['x', 'y', 'z'])     #
 underlying store is a tuple
   Point = make_dataclass('Point', ['x', 'y', 'z'])   #
 underlying store is an instance dict
Hm, I think this is a bug in implementation. The second form should also work.
Agreed.
I have a bunch of pending changes for dataclasses. I'll add this.
Eric.
_______________________________________________
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

Reply via email to