Re: [Python-Dev] How about updating OrderedDict in csv and configparser to regular dict?

2019-01-31 Thread INADA Naoki
I'm sorry, configparser is changed already. https://bugs.python.org/issue33504 On Thu, Jan 31, 2019 at 4:52 PM INADA Naoki wrote: > > Hi, > > csv.DictReader uses OrderedDict by default, from Python 3.6. > But it doesn't make sense anymore, like namedtuple._asdict(). > How about changing default d

Re: [Python-Dev] How about updating OrderedDict in csv and configparser to regular dict?

2019-01-31 Thread Michael Selik
Waiting on review https://github.com/python/cpython/pull/8014 On Thu, Jan 31, 2019, 12:04 AM INADA Naoki I'm sorry, configparser is changed already. > https://bugs.python.org/issue33504 > > On Thu, Jan 31, 2019 at 4:52 PM INADA Naoki > wrote: > > > > Hi, > > > > csv.DictReader uses OrderedDict b

Re: [Python-Dev] How to update namedtuple asdict() to use dict instead of OrderedDict

2019-01-31 Thread Antoine Pitrou
On Wed, 30 Jan 2019 14:32:38 -0800 Raymond Hettinger wrote: > > My recommendation is Option 4 as being less disruptive and more beneficial > than the other options. Option 4 here as well. Sometimes perfection is the enemy of the good. Regards Antoine. __

Re: [Python-Dev] How about updating OrderedDict in csv and configparser to regular dict?

2019-01-31 Thread Steve Holden
I submitted the patch to make the csv module use an OrderedDict in DictReader. It doesn't, AFAIR, use anything but the ordering property of ordered dict, so the reversion to a simple dict should be perfectly OK as long as no consumers have started to make use of specific OrderedDict properties. re

[Python-Dev] Fwd: How about updating OrderedDict in csv and configparser to regular dict?

2019-01-31 Thread Steve Holden
-- Forwarded message - From: Steve Holden Date: Thu, Jan 31, 2019 at 11:05 AM Subject: Re: [Python-Dev] How about updating OrderedDict in csv and configparser to regular dict? To: INADA Naoki And I see that such a patch is now merged. Thanks, Raymond! > >>

Re: [Python-Dev] Add more SyntaxWarnings?

2019-01-31 Thread Nick Coghlan
On Thu, 31 Jan 2019 at 04:16, Stefan Behnel wrote: > I faintly recall someone implementing something in that direction. It's > probably in some package on PyPI. You may be thinking of Doug Hellman's https://pypi.org/project/whatthewhat/ Cheers, Nick. P.S. More horrifyingly (in an amusing way),

Re: [Python-Dev] How to update namedtuple asdict() to use dict instead of OrderedDict

2019-01-31 Thread Nick Coghlan
On Thu, 31 Jan 2019 at 16:40, Glenn Linderman wrote: >> On 1/30/2019 8:45 PM, Raymond Hettinger wrote: >>> On Jan 30, 2019, at 3:41 PM, Glenn Linderman wrote: >>> Would it be practical to add deprecated methods to regular dict for the >>> OrderedDict reordering methods that raise with an error s

Re: [Python-Dev] Fwd: How about updating OrderedDict in csv and configparser to regular dict?

2019-01-31 Thread Raymond Hettinger
> On Jan 31, 2019, at 3:06 AM, Steve Holden wrote: > > And I see that such a patch is now merged. Thanks, Raymond! And thank you for getting ordering into csv.DictReader. That was a significant improvement in usability :-) Raymond ___ Python-De

Re: [Python-Dev] How to update namedtuple asdict() to use dict instead of OrderedDict

2019-01-31 Thread Nathaniel Smith
On Thu, Jan 31, 2019, 05:26 Nick Coghlan On Thu, 31 Jan 2019 at 16:40, Glenn Linderman > wrote: > >> On 1/30/2019 8:45 PM, Raymond Hettinger wrote: > >>> On Jan 30, 2019, at 3:41 PM, Glenn Linderman > wrote: > >>> Would it be practical to add deprecated methods to regular dict for > the OrderedD