Author eric.smith
Recipients eric.smith, levkivskyi, rhettinger
Date 2017-12-11.19:47:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Make the typing information optional.

From Raymond Hettinger:

The make_dataclass() factory function in the dataclasses module currently requires type declarations. It would be nice if the type declarations were optional.

With typing (currently works):

    Point = NamedTuple('Point', [('x', float), ('y', float), ('z', float)])
    Point = make_dataclass('Point', [('x', float), ('y', float), ('z', float)])

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
Date User Action Args
2017-12-11 19:47:31eric.smithsetrecipients: + eric.smith, rhettinger, levkivskyi
2017-12-11 19:47:31eric.smithsetmessageid: <>
2017-12-11 19:47:31eric.smithlinkissue32278 messages
2017-12-11 19:47:31eric.smithcreate