[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2adcd79bf90415147691a51a4cb046d5920f6ce7 by Serhiy Storchaka in branch '3.8': bpo-38191: Use positional-only parameters in TypedDict(). (GH-16240) https://github.com/python/cpython/commit/2adcd79bf90415147691a51a4cb046d5920f6ce7 --

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8fc5839a9def34c13b6025c291434ba5fb5d6442 by Serhiy Storchaka in branch 'master': bpo-38191: Turn warnings into errors in NamedTuple() and TypedDict(). (GH-16238) https://github.com/python/cpython/commit/8fc5839a9def34c13b6025c291434ba5fb5d6442

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 69b3718b183a698202bd67488639bffd64a488bc by Serhiy Storchaka in branch '3.7': [3.7] bpo-38191: Accept arbitrary keyword names in NamedTuple(). (GH-16222) (GH-16239) https://github.com/python/cpython/commit/69b3718b183a698202bd67488639bffd64a4

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, when backported to 3.7 I have found that TypedDict is new in 3.8. So I think it is better to get rid of deprecations in TypedDict(). -- ___ Python tracker ___

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +15837 pull_request: https://github.com/python/cpython/pull/16240 ___ Python tracker ___

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +15836 pull_request: https://github.com/python/cpython/pull/16239 ___ Python tracker ___

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread miss-islington
miss-islington added the comment: New changeset 54ba5f19d4a654768c785468d736ed0bd05947f5 by Miss Islington (bot) in branch '3.8': bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222) https://github.com/python/cpython/commit/54ba5f19d4a654768c785468d736ed0bd05

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +15835 pull_request: https://github.com/python/cpython/pull/16238 ___ Python tracker ___

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2bf31ccab3d17f3f35b42dca97f99576dfe2fc7d by Serhiy Storchaka in branch 'master': bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222) https://github.com/python/cpython/commit/2bf31ccab3d17f3f35b42dca97f99576df

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +15834 pull_request: https://github.com/python/cpython/pull/16237 ___ Python tracker ___ __

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 16222 adds support for arbitrary keyword argument names in NamedTuple and TypedDict. Passing arguments like "typename", "_typename", "fields" and "_fields" by keyword is still supported, but deprecated. I'm going to backport this to 3.8 and 3.7 (to 3.7

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +15822 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16222 ___ Python tracker ___

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks as a good case for positional-only parameters. But first passing these arguments by keyword should be deprecated. -- assignee: -> serhiy.storchaka nosy: +gvanrossum, levkivskyi, serhiy.storchaka ___ Python

[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-16 Thread Glenn Gribble
New submission from Glenn Gribble : At present, it is not possible to use the shorthand notation to define a NamedTuple with typename or fields. I.e., NamedTuple('MyTuple', typename=str, fields=int) does not work. Changing the parameter names to _typename and _fields would allow any non-pri