I think the documentation is correct but you misinterpreted the intent of
that code. The code you're quoting, which is an example, is not about
ending up with a custom dict within the instance, the intent of the author
was just to captur the memeber_names list. So what it does for that is
customizi
Hi,
I would like to propose an improvement to the functions in the bisect
library, to add a 'key' parameter, similar to 'sorted' or other system
functions.
--
Chibici Tiberiu
___
Python-ideas mailing list
[email protected]
https://mail.python.org/
On Sun, Nov 04, 2018 at 02:20:31PM +0200, Tiberiu Chibici wrote:
> Hi,
> I would like to propose an improvement to the functions in the bisect
> library, to add a 'key' parameter, similar to 'sorted' or other system
> functions.
Quoting the bug tracker:
This request has come up repeatedly (an
On Mon, Nov 05, 2018 at 12:19:49AM +1100, Steven D'Aprano wrote:
> On Sun, Nov 04, 2018 at 02:20:31PM +0200, Tiberiu Chibici wrote:
> > Hi,
> > I would like to propose an improvement to the functions in the bisect
> > library, to add a 'key' parameter, similar to 'sorted' or other system
> > functi
On Nov 3, 2018, at 5:43 PM, Greg Ewing wrote:
> David Shawley wrote:
> > I'm +1 on adding support for serializing datetime.date and
> > datetime.datetime *but* I'm -1 on automatically deserializing anything that
> > looks like a ISO-8601 in json.load*. The asymmetry is the only thing that
> > ke
That link has Guido and Raymond Hettinger ending +1 and looking to either add
it or writing a simple copy paste:able recipe to the docs. I mean, that's how I
read it, did you read that and come to a different impression?
> On 4 Nov 2018, at 14:19, Steven D'Aprano wrote:
>
>> On Sun, Nov 04, 2
Oh heh. Well there we go :)
> On 4 Nov 2018, at 14:33, Steven D'Aprano wrote:
>
>> On Mon, Nov 05, 2018 at 12:19:49AM +1100, Steven D'Aprano wrote:
>>> On Sun, Nov 04, 2018 at 02:20:31PM +0200, Tiberiu Chibici wrote:
>>> Hi,
>>> I would like to propose an improvement to the functions in the bise
Here's a JSONEncoder subclass with a default method that checks variable
types in a defined sequence that includes datetime:
https://gist.github.com/majgis/4200488
Passing an ordered map of (Type, fn) may or may not be any more readable
than simply subclassing JSONEncoder and defining .default().