Re: [Python-ideas] f-string "debug" conversion

2019-05-03 Thread Eric V. Smith
> On Oct 4, 2018, at 6:24 PM, Tim Peters wrote: > > [Tim] >> >> > Note that transforming >> > >> > {EXPR!d:FMT} >> > >> > into >> > >> > EXPR={repr(EXPR):FMT} >> > >> > is actually slightly more involved than transforming it into >> > >> > EXPR={EXPR:FMT} >> > >> > so I don't

[Python-ideas] add an additional dataclasses.asdict option for non-dataclasses

2019-05-03 Thread Ricky Teachey
I just joined the ideas list today so I do not know if this has been discussed. Using dataclasses has been great for me, but a challenge is what to do when you don't *know* if the object you are using is a dataclass, and could be a variety of other classes. This could easily occur when you don't

Re: [Python-ideas] add an additional dataclasses.asdict option for non-dataclasses

2019-05-03 Thread Rhodri James
On 03/05/2019 17:37, Ricky Teachey wrote: I just joined the ideas list today so I do not know if this has been discussed. Using dataclasses has been great for me, but a challenge is what to do when you don't *know* if the object you are using is a dataclass, and could be a variety of other class

Re: [Python-ideas] add an additional dataclasses.asdict option for non-dataclasses

2019-05-03 Thread Anders Hovmöller
And what about recursive structures? I do think this is a rabbit hole worth getting into as I've written an iffy dict serializer (and differ) for an audit system at work. There are many uses for such a thing I think. But maybe we just need some informal protocol? > On 3 May 2019, at 19:00, Rho