[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-20 Thread Matthew Einhorn
On Fri, Nov 20, 2020 at 7:20 PM Greg Ewing wrote: > On 21/11/20 3:03 am, Paul Moore wrote: > > For my own purposes, what I *actually* want is to specify a list of > > 3rd party packages ... > > I *don't* want clever logic to decide how to strip out "unused" bits. > > I concur. > > With venvs, it

[Python-ideas] Re: Adding PyInstaller to the standard library

2020-11-20 Thread Matthew Einhorn
On Fri, Nov 20, 2020 at 8:48 AM Greg Ewing wrote: > On 20/11/20 9:17 pm, Andrew Svetlov wrote: > > Digging into the problem more, I've figured out that PyInstaller has > > hooks > > < > https://github.com/pyinstaller/pyinstaller/tree/develop/PyInstaller/hooks> > > > for a bunch of popular

[Python-ideas] Re: Add builtin function for min(max())

2020-07-03 Thread Matthew Einhorn
On Fri, Jul 3, 2020 at 5:57 PM Soni L. wrote: > > > On 2020-07-03 6:05 p.m., Federico Salerno wrote: > > Even after years of coding it sometimes takes me a moment to correctly > parse expressions like `min(max(value, minimum), maximum)`, especially when > the parentheses enclose some local

[Python-ideas] Re: An alternative way of defining properties (warning: contains creative abuse of the class statement)

2020-07-02 Thread Matthew Einhorn
On Thu, Jul 2, 2020, 6:30 AM Greg Ewing wrote: > On 2/07/20 8:04 pm, Serhiy Storchaka wrote: > > It has a problem with pickling (it is solvable). > > Can you elaborate? The end result is a property object just the > same as you would get from using @property or calling property > directly. I

[Python-ideas] Re: Python WebAssembly Support

2020-06-15 Thread Matthew Einhorn
On Mon, Jun 15, 2020 at 4:46 PM wrote: > Hi all, > > I love Python, but as soon as I need to do something in browser I have to > use ugly JavaScript !! > > Is there any future plans support for compiling CPython to WebAssembly > using Emscripten ? > There is already a project working on this:

[Python-ideas] Re: Add close method to queue

2020-06-09 Thread Matthew Einhorn
ading.html#threading.RLock>. You can use a normal Lock, it's just that I needed to be able to call this from __del__ <https://docs.python.org/3/reference/datamodel.html#object.__del__> so I needed a lock that can be re-entered. > > > Отправлено из приложения "Почта > <ht

[Python-ideas] Re: Adding a "once" function to functools

2020-04-26 Thread Matthew Einhorn
On Sun, Apr 26, 2020 at 1:54 PM Tom Forbes wrote: > This is a good idea but some cases need to be lazily evaluated. Without > that property `once()` loses a lot of utility. In the case of Django some > of the decorated functions create objects that cannot be instantiated > until the Django

[Python-ideas] Re: PyPI should include PEP 440-compliant version strings for including in install_requires

2020-02-09 Thread Matthew Einhorn
On Sun, Feb 9, 2020, 11:03 AM Paul Moore wrote: > On Sun, 9 Feb 2020 at 14:39, Soni L. wrote: > > > > Figuring out versioning is hard. PyPI should encourage semver by > > including PEP 440 version strings that you can copy and paste into > > install_requires. > > I don't understand what you

Re: [Python-ideas] Why shouldn't Python be better at implementing Domain Specific Languages?

2018-08-31 Thread Matthew Einhorn
On Thu, Aug 30, 2018 at 8:31 PM James Lu wrote: > Why shouldn't Python be better at implementing Domain Specific Languages? > > [snip] > > It would be nice if there was a DSL for describing neural networks (Keras). > The current syntax looks like this: > > model.add(Dense(units=64,

Re: [Python-ideas] Unpacking iterables for augmented assignment

2018-08-26 Thread Matthew Einhorn
On Sun, Aug 26, 2018, 9:24 PM James Lu wrote: > Hi Johnathan > > I echo your points. Indeed, the PEP referenced to refers to a "tuple > expression" in the grammatical and not the programmatic sense. > > Finally, here's something that surprised me a little bit > > >>> x = [1, 2]; id(x) >

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Matthew Einhorn
Hi Mike I'm not sure this thread is python-ideas appropriate, but since the challenge is out, here it is using Kivy. The code and result is at https://gist.github.com/matham/45c4f1fbd8c3fccf6557b3b48356cd50 (image