On Tue, Mar 2, 2021 at 8:11 PM Dan Stromberg wrote:
>
> On Tue, Mar 2, 2021 at 8:00 PM Russell wrote:
>
>> Ethan Furman wrote:
>> > I'm currently using vim, and the primary reason I've stuck with it for
>> so long is because I can get truly black screens with it. By which I mean
>> that I have
On Wed, Mar 3, 2021 at 2:06 PM Greg Ewing wrote:
>
> On 3/03/21 12:24 pm, Chris Angelico wrote:
> > if PRODUCTION:
> > def assert(*a, **kw): pass
> >
> > would work if it were a function :)
>
> But would cost you a useless function call for every assert
> in production mode.
>
A micro-optimi
On Tue, Mar 2, 2021 at 8:00 PM Russell wrote:
> Ethan Furman wrote:
> > I'm currently using vim, and the primary reason I've stuck with it for
> so long is because I can get truly black screens with it. By which I mean
> that I have a colorful window title bar, a light-grey menu bar, and then a
Ethan Furman wrote:
> I'm currently using vim, and the primary reason I've stuck with it for so
> long is because I can get truly black screens with it. By which I mean that
> I have a colorful window title bar, a light-grey menu bar, and then a
> light-grey frame around the text-editing windo
On 3/03/21 12:24 pm, Chris Angelico wrote:
if PRODUCTION:
def assert(*a, **kw): pass
would work if it were a function :)
But would cost you a useless function call for every assert
in production mode.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 24 Feb 2021 22:35:32 +1100
John O'Hagan wrote:
> Hi list
>
> I have a 3.9 tkinter interface that displays data from an arbitrary
> number of threads, each of which runs for an arbitrary period of time.
> A frame opens in the root window when each thread starts and closes
> when it stops.
On 02Mar2021 15:06, Larry Martell wrote:
>I discovered something new (to me) yesterday. Was writing a unit test
>for generator function and I found that none of the function got
>executed at all until I iterated on the return value.
Aye. Generators are lazy - they don't run at all until you ask f
On Wed, Mar 3, 2021 at 10:48 AM Hexamorph wrote:
>
> Am 03.03.2021 um 00:24 schrieb Chris Angelico:
> > On Wed, Mar 3, 2021 at 10:22 AM Mirko via Python-list
> > wrote:
> >>
> >> Am 02.03.2021 um 23:09 schrieb Stestagg:
> >>> Ignoring the question about this feature being particularly useful, it
Am 03.03.2021 um 00:24 schrieb Chris Angelico:
> On Wed, Mar 3, 2021 at 10:22 AM Mirko via Python-list
> wrote:
>>
>> Am 02.03.2021 um 23:09 schrieb Stestagg:
>>> Ignoring the question about this feature being particularly useful, it
>>
>> It is useful because "assert" is primarily (if not purely
On Wed, Mar 3, 2021 at 10:22 AM Mirko via Python-list
wrote:
>
> Am 02.03.2021 um 23:09 schrieb Stestagg:
> > Ignoring the question about this feature being particularly useful, it
>
> It is useful because "assert" is primarily (if not purely and
> exclusive) a debugging tool during development an
Am 02.03.2021 um 23:09 schrieb Stestagg:
> Ignoring the question about this feature being particularly useful, it
It is useful because "assert" is primarily (if not purely and
exclusive) a debugging tool during development and testing.
In production code you don't want any asserts, but logging. H
On Tue, Mar 2, 2021 at 2:16 PM Chris Angelico wrote:
>
> On Tue, Mar 2, 2021 at 5:51 AM Alan Gauld via Python-list
> wrote:
> >
> > On 28/02/2021 00:17, Cameron Simpson wrote:
> >
> > > BUT... It also has a __iter__ value, which like any Box iterates over
> > > the subboxes. For MDAT that is impl
On Mon, 1 Mar 2021 at 19:51, Alan Gauld via Python-list
wrote:
> Sorry, a bit OT but I'm curious. I haven't seen
> this before:
>
> yield from ()
>
> What is it doing?
> What do the () represent in this context?
It's the empty tuple.
--
https://mail.python.org/mailman/listinfo/python-list
> On 2 Mar 2021, at 20:54, Marco Sulla wrote:
>
> I have a curiosity. Python, as many languages, has assert as a
> keyword. Can't it be implemented as a function? Is there an advantage
> to have it as a keyword?
assert condition, expression
Only is condition is false with expression be evalu
Remember us? It's your friendly CPython release team and we have something
we think you may like: The new alpha release of Python 3.10 is here, now
with 100% more pattern matching. If I were you, I would download it and
start playing with it. Extra points if you report us any bugs you find
along th
On Tue, Mar 2, 2021 at 5:51 AM Alan Gauld via Python-list
wrote:
>
> On 28/02/2021 00:17, Cameron Simpson wrote:
>
> > BUT... It also has a __iter__ value, which like any Box iterates over
> > the subboxes. For MDAT that is implemented like this:
> >
> > def __iter__(self):
> > yield f
There is also the, I think seldom used, feature that calling python with
'-O' removes all assert statements at parse/compile time (I believe for
performance reasons)
So for example:
$ python -c 'assert False'
Traceback (most recent call last):
File "", line 1, in
AssertionError
But:
$ python
Hello,
this is windows setup issue related to the fact that python binary is not
in execution path.
For setting up you may find instructions by searching for "windows 10 put
python to path". One result is following page:
https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-pat
On 28/02/2021 23:47, Alan Gauld via Python-list wrote:
> On 28/02/2021 00:17, Cameron Simpson wrote:
>
>> BUT... It also has a __iter__ value, which like any Box iterates over
>> the subboxes. For MDAT that is implemented like this:
>>
>> def __iter__(self):
>> yield from ()
>
> Sorr
On Wed, Mar 3, 2021 at 8:21 AM Dieter Maurer wrote:
>
> Alan Gauld wrote at 2021-2-28 23:47 +:
> >yield from ()
>
> "yield from iterator" is similar to "for i in iterator: yield i" (with
> special handling when data/exceptions are injected into the generator).
>
> Thus, "yield from ()" does es
Alan Gauld wrote at 2021-2-28 23:47 +:
>yield from ()
"yield from iterator" is similar to "for i in iterator: yield i" (with
special handling when data/exceptions are injected into the generator).
Thus, "yield from ()" does essentially nothing with the side effect
that the containing function
On Wed, Mar 3, 2021 at 7:53 AM Marco Sulla wrote:
>
> I have a curiosity. Python, as many languages, has assert as a
> keyword. Can't it be implemented as a function? Is there an advantage
> to have it as a keyword?
It could, but it would need some magic. A lot of test frameworks have
their own s
On 01/03/2021 00:47, Alan Gauld via Python-list wrote:
On 28/02/2021 00:17, Cameron Simpson wrote:
BUT... It also has a __iter__ value, which like any Box iterates over
the subboxes. For MDAT that is implemented like this:
def __iter__(self):
yield from ()
Sorry, a bit OT but I
On 3/1/21 10:46 AM, manfred.schm...@posteo.de wrote:
Hello Python Team,
i tried to install SW above; the installation stopped with the
message
"one or more issues caused the setup to fail.
Please the issues and then retry
0x80070642 installation stopped by user"
What must i do go get the SW in
I have a curiosity. Python, as many languages, has assert as a
keyword. Can't it be implemented as a function? Is there an advantage
to have it as a keyword?
--
https://mail.python.org/mailman/listinfo/python-list
Remember us? It's your friendly CPython release team and we have something
we think you may like: The new alpha release of Python 3.10 is here, now
with 100% more pattern matching. If I were you, I would download it and
start playing with it. Extra points if you report us any bugs you find
along th
Hi,
On Mon, Mar 1, 2021 at 12:56 PM singh.veer9--- via Python-list
wrote:
>
>Dear Sir/Madam
>
>Sir I am facing the issue from 10 days. And I tried all the ways to remove
>this or to come out of this problem
>but as i try to install some PYTEST or OPENPYXL packages using pip it
On 01Mar2021 14:10, Grant Edwards wrote:
>That was certainly my reaction. Can you imagine the confusion if len()
>of a list returned the number of bytes required for srorage insttead
>of the number of elements?
Yeah, well the ancestry of these classes is a binary
deserialise/serialise base class
On 28Feb2021 23:47, Alan Gauld wrote:
>On 28/02/2021 00:17, Cameron Simpson wrote:
>> BUT... It also has a __iter__ value, which like any Box iterates over
>> the subboxes. For MDAT that is implemented like this:
>>
>> def __iter__(self):
>> yield from ()
>
>Sorry, a bit OT but I'm cur
29 matches
Mail list logo