[issue32278] Allow dataclasses.make_dataclass() to omit type information

2018-01-06 Thread Eric V. Smith

Eric V. Smith  added the comment:


New changeset ed7d429ebb591f65cef558760fb4ebdc4fc8f8b0 by Eric V. Smith in 
branch 'master':
bpo-32278: Allow dataclasses.make_dataclass() to omit type information. 
(gh-5115)
https://github.com/python/cpython/commit/ed7d429ebb591f65cef558760fb4ebdc4fc8f8b0


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32278] Allow dataclasses.make_dataclass() to omit type information

2018-01-06 Thread Eric V. Smith

Change by Eric V. Smith :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32278] Allow dataclasses.make_dataclass() to omit type information

2018-01-06 Thread Eric V. Smith

Change by Eric V. Smith :


--
pull_requests: +4981

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32278] Allow dataclasses.make_dataclass() to omit type information

2017-12-22 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32278] Allow dataclasses.make_dataclass() to omit type information

2017-12-22 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
keywords: +patch
pull_requests: +4871
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32278] Allow dataclasses.make_dataclass() to omit type information

2017-12-18 Thread Eric V. Smith

Eric V. Smith  added the comment:

I'm going to use "typing.Any" (as a string) if the type information is omitted 
in the call to make_dataclass(). That way I don't need to import typing.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32278] Allow dataclasses.make_dataclass() to omit type information

2017-12-11 Thread Eric V. Smith

New submission from Eric V. Smith :

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

--
assignee: eric.smith
components: Library (Lib)
messages: 308071
nosy: eric.smith, levkivskyi, rhettinger
priority: normal
severity: normal
status: open
title: Allow dataclasses.make_dataclass() to omit type information
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com