[Python-ideas] Re: Ensuring that a package is available.

2020-09-03 Thread Shahriar Heidrich
On 9/3/20 2:47 AM, Charles Machalow wrote: > I may be in the minority, but sometimes it seems like having to spin up a > venv, etc. to run a small script could be a little bit much. > > What if we have something like this POC I wrote: > https://pypi.org/project/pyensure/ > > We could have a swit

[Python-ideas] Pickle improvement: global qualnames for local classes

2020-09-03 Thread haael
Only objects of globally defined classes are picklable: class Global: pass picklable = Global() def f(): class Local: pass return Local Local_here = f() unpicklable = Local_here() However, instances become picklable if we assign the l

[Python-ideas] Re: Pickle improvement: global qualnames for local classes

2020-09-03 Thread Paul Moore
On Thu, 3 Sep 2020 at 18:06, haael wrote: > Only objects of globally defined classes are picklable: > > class Global: > pass > > picklable = Global() > > def f(): > class Local: > pass > return Local > > Local_here = f() > unpicklab

[Python-ideas] Package kwargs to support Guido's favoured semantics

2020-09-03 Thread Jonathan Fine
The next release of kwkey will provide a class A with the following property. It is that >>> A(1, 2, a=3, b=4)[d] = 'val' will result in >>> d.__setitem__((1, 2), 'val', a=3, b=4) This is precisely the same call that would result from >>> d[1, 2, a=3, b=4] = 'val' using the semantics

[Python-ideas] Re: Package kwargs to support Guido's favoured semantics

2020-09-03 Thread Jonathan Fine
Oops. Should read Subject: Package kwkey to support Guido's favoured semantics Please accept my apologies. -- Jonathan ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.py