Re: Local variable definition in Python list comprehension

2022-09-02 Thread Dan Stromberg
On Thu, Sep 1, 2022 at 9:16 AM Chris Angelico wrote: > On Fri, 2 Sept 2022 at 02:10, James Tsai wrote: > > > > Hello, > > > > I find it very useful if I am allowed to define new local variables in a > list comprehension. For example, I wish to have something like > > [(x, y) for x in range(10)

Re: Local variable definition in Python list comprehension

2022-09-02 Thread James Tsai
在 2022年9月2日星期五 UTC+2 00:17:23, 写道: > On 02Sep2022 07:01, Chris Angelico wrote: > >On Fri, 2 Sept 2022 at 06:55, James Tsai wrote: > >> No but very often when I have written a neat list/dict/set > >> comprehension, I find it very necessary > >> to define local variable(s) to make it more

Re: When should I use "parent=None" in __ini__ and "parent" in super()

2022-09-02 Thread Cameron Simpson
On 23Sep2021 20:38, Mohsen Owzar wrote: I'm writing since almost one-year codes in Python, using TKinter and PyQt5. I'm somehow able to writes GUIs in both of them. But since I'm using more Pyqt5 and using classes with initialization and super() constructs, and also I saw lots of videos and

[Python-announce] pytest 7.1.3

2022-09-02 Thread Bruno Oliveira
pytest 7.1.3 has just been released to PyPI. This is a bug-fix release, being a drop-in replacement. To upgrade:: pip install --upgrade pytest The full changelog is available at https://docs.pytest.org/en/stable/changelog.html. Thanks to all of the contributors to this release: * Anthony