[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

bpo-39142: Avoid converting namedtuple instances to ConvertingTuple. by vsajip · Pull Request #17773 · python/cpython

vsajip

This uses the heuristic of assuming a named tuple is a subclass of
tuple with a _fields attribute. This change means that contents of
a named tuple wouldn't be converted - if a user wants to have
ConvertingTuple functionality from a namedtuple, they will have to
implement it themselves.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Jan 1, 2020
…ythonGH-17773)

This uses the heuristic of assuming a named tuple is a subclass of
tuple with a _fields attribute. This change means that contents of
a named tuple wouldn't be converted - if a user wants to have
ConvertingTuple functionality from a namedtuple, they will have to
implement it themselves.
(cherry picked from commit 46abfc1)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>

vsajip pushed a commit that referenced this pull request

Jan 1, 2020

vsajip pushed a commit that referenced this pull request

Jan 1, 2020

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request

Jan 31, 2020

…ythonGH-17773)

This uses the heuristic of assuming a named tuple is a subclass of
tuple with a _fields attribute. This change means that contents of
a named tuple wouldn't be converted - if a user wants to have
ConvertingTuple functionality from a namedtuple, they will have to
implement it themselves.