Re: get_used_memory

2026-06-14 Thread Jon Ribbens via Python-list
On 2026-06-15, Paul Rubin wrote: > Jon Ribbens writes: >> {e[0][:-1]: int(e[1]) for x in xs if (e := x.split())} > > Does this work? > > { a : int(b)) for x in xs if (a,b := x.split()) } No, for three reasons. Firstly, the lines with units result in x.split() having 3 members, so you can't

Re: get_used_memory

2026-06-14 Thread Chris Angelico via Python-list
On Mon, 15 Jun 2026 at 14:27, Jon Ribbens via Python-list wrote: > > On 2026-06-15, Paul Rubin wrote: > > Jon Ribbens writes: > >> {e[0][:-1]: int(e[1]) for x in xs if (e := x.split())} > > > > Does this work? > > > > { a : int(b)) for x in xs if (a,b := x.split()) } > > No, for three reas