Re: [Python-ideas] Suggested MapView object (Re: __len__() for map())

2018-12-13 Thread Paul Moore
On Thu, 13 Dec 2018 at 05:55, Greg Ewing wrote: > > Chris Angelico wrote: > > On Thu, Dec 13, 2018 at 3:07 PM Chris Barker - NOAA Federal via > > Python-ideas wrote: > > > > obj is iter(obj) > >> > >>Is that a hard and fast rule? > > Yes, it is. > > > > https://docs.python.org/3/library/stdt

Re: [Python-ideas] Suggested MapView object (Re: __len__() for map())

2018-12-13 Thread Steven D'Aprano
On Thu, Dec 13, 2018 at 06:53:54PM +1300, Greg Ewing wrote: > In any case, I don't claim that my MapView implements the full > iterator protocol, only enough of it to pass for an iterator in > most likely scenarios that assume one. Whether your hybrid sequence+iterator is close enough to an itera

[Python-ideas] It would be great if the json module would allow and clear existing comments.

2018-12-13 Thread João Matos
Hello, Comments in JSON files are a great way to document a configuration file for example. Even JSON's Douglas Crockford agrees that it is a helpful thing and it suggests using JSMin before handing it to the JSON parser in here https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaGSr So,