On 2022-03-07 06:00:57 -0800, Grant Edwards wrote:
> On 2022-03-07, Peter J. Holzer wrote:
> > On 2022-03-06 18:34:39 -0800, Grant Edwards wrote:
> >> On 2022-03-06, Avi Gross via Python-list wrote:
> >> > Python is named after a snake right?
> >>
> >> No. It's named after a comedy troupe.
> >
>
Op 4/03/2022 om 02:08 schreef Avi Gross via Python-list:
If Python was being designed TODAY, I wonder if a larger set of key words would
be marked as RESERVED for future expansion including ORELSE and even
NEVERTHELESS.
I think a better solution would be to have reserved words written lette
On Mon, 7 Mar 2022 18:07:42 +, "Schachner, Joseph"
declaimed the following:
>Can someone please change the topic of this thread? No longer about for-else.
>
Pretty much anyone can change the subject of the message when replying.
But if one is using a threaded client, that t
Can someone please change the topic of this thread? No longer about for-else.
Teledyne Confidential; Commercially Sensitive Business Data
-Original Message-
From: Dennis Lee Bieber
Sent: Sunday, March 6, 2022 1:29 PM
To: python-list@python.org
Subject: Re: Behavior of the for-else
On 2022-03-07, Peter J. Holzer wrote:
> On 2022-03-06 18:34:39 -0800, Grant Edwards wrote:
>> On 2022-03-06, Avi Gross via Python-list wrote:
>> > Python is named after a snake right?
>>
>> No. It's named after a comedy troupe.
>
> He actually wrote that two sentences later.
Yes, I missed that.
On 2022-03-06 18:34:39 -0800, Grant Edwards wrote:
> On 2022-03-06, Avi Gross via Python-list wrote:
> > Python is named after a snake right?
>
> No. It's named after a comedy troupe.
He actually wrote that two sentences later.
hp
--
_ | Peter J. Holzer| Story must make more s
On 2022-03-06, Avi Gross via Python-list wrote:
> Python is named after a snake right?
No. It's named after a comedy troupe.
--
Grant
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 6 Mar 2022 17:39:51 +0100, "Peter J. Holzer"
declaimed the following:
>
>(* *) for comments was actually pretty commonly used - maybe because it
>stands out more than { }. I don't know if I've ever seen (. .) instead
>of [ ].
>
Or some terminals provided [ ] but not { }
On Mon, 7 Mar 2022 at 09:51, Avi Gross via Python-list
wrote:
>
> >>>
> Pascal versus PASCAL versus pascal (not versus paschal) and
> Perl versus PERL versus perl (not versus pearl)
>
> seems to be a topic.
> <<<
>
> The nitpickers here are irrelevant. I happen to know how things are formally
> s
orrect, it has a
proper spelling. But following that reasoning, why does anyone give an email
address of john.sm...@gmail.com or jane...@yahoo.com instead of ...?
-Original Message-
From: Peter J. Holzer
To: python-list@python.org
Sent: Sun, Mar 6, 2022 12:48 pm
Subject: Re: Behavior
On 2022-03-06 09:29:19 -0800, Grant Edwards wrote:
> On 2022-03-05, Avi Gross via Python-list wrote:
> > I am not sure how we end up conversing about PASCAL on a Python
> > forum.
> > [...]
> > I paid no attention to where PASCAL was being used other than I did
> > much of my grad school work in P
On 2022-03-05, Avi Gross via Python-list wrote:
> I am not sure how we end up conversing about PASCAL on a Python
> forum.
> [...]
> I paid no attention to where PASCAL was being used other than I did
> much of my grad school work in PASCAL [...]
It's "Pascal". It's not an acronym. It's a guy's
On 2022-03-05 14:25:35 -0500, Dennis Lee Bieber wrote:
> On Sat, 5 Mar 2022 12:39:36 -0600, "Michael F. Stemper"
> declaimed the following:
> >... especially Pascal, which was probably bigger in Germany and Austria
> >in the 1980s than was C.
>
> Pascal also defined alternate representation
and other languages
to undergrads ;-)
-Original Message-
From: Dennis Lee Bieber
To: python-list@python.org
Sent: Sat, Mar 5, 2022 7:00 pm
Subject: Re: Behavior of the for-else construct
On Sat, 5 Mar 2022 21:40:08 + (UTC), Avi Gross
declaimed the following:
>I am not sure how we end
On Sat, 5 Mar 2022 21:40:08 + (UTC), Avi Gross
declaimed the following:
>I am not sure how we end up conversing about PASCAL on a Python forum. But it
>is worth considering how people educated in aspects of Computer Science often
>come from somewhat different background and how it flavors w
On 05Mar2022 17:48, Avi Gross wrote:
>Since we still seem to be dreaming, I wonder when someone will suggest using
>some variation of the new match statement.
Ugh :-)
But...
What if break were implemented with an exception, like StopIteration but
for interruption instead of stop? And for-loop
To: python-list@python.org
Sent: Sat, Mar 5, 2022 1:39 pm
Subject: Re: Behavior of the for-else construct
On 04/03/2022 18.11, Peter J. Holzer wrote:
> On 2022-03-04 23:47:09 +, Avi Gross via Python-list wrote:
>> I am not sure a reply is needed, Peter, and what you say is true. But
On 04/03/2022 18.11, Peter J. Holzer wrote:
On 2022-03-04 23:47:09 +, Avi Gross via Python-list wrote:
I am not sure a reply is needed, Peter, and what you say is true. But
as you point out, when using a German keyboard, I would already have
a way to enter symbols like ä, ö, ü and ß and no
On Sat, 5 Mar 2022 12:39:36 -0600, "Michael F. Stemper"
declaimed the following:
>... especially Pascal, which was probably bigger in Germany and Austria
>in the 1980s than was C.
Pascal also defined alternate representations (per Jensen&Wirth) for
some of those (and I don't recall ever
my part of this endless conversation may have gone a bit beyond far
enough and I await some new topics.
-Original Message-
From: Rob Cliffe via Python-list
To: python-list@python.org
Sent: Sat, Mar 5, 2022 7:15 am
Subject: Re: Behavior of the for-else construct
On 05/03/2022 01:15, Camer
On 05/03/2022 01:15, Cameron Simpson wrote:
I sort of wish it had both "used break" and "did not use break"
branches, a bit like try/except/else.
And "zero iterations".
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 2022-03-05 00:25:44 +0100, Peter J. Holzer wrote:
> On 2022-03-04 11:34:07 +1100, Chris Angelico wrote:
> > What I'm hearing is that there are, broadly speaking, two types of
> > programmers [1]:
> >
> > 1) Those who think about "for-else" as a search tool and perfectly
> > understand how it be
On 03Mar2022 14:24, computermaster360 wrote:
>I want to make a little survey here.
>
>Do you find the for-else construct useful? Have you used it in
>practice? Do you even know how it works, or that there is such a thing
>in Python?
I used Python for years before understanding the for-else (and
On 2022-03-04 23:47:09 +, Avi Gross via Python-list wrote:
> I am not sure a reply is needed, Peter, and what you say is true. But
> as you point out, when using a German keyboard, I would already have
> a way to enter symbols like ä, ö, ü and ß and no reason not to include
> them in variable
hon-list@python.org
Sent: Fri, Mar 4, 2022 5:57 pm
Subject: Re: Behavior of the for-else construct
On 2022-03-04 00:38:22 +, Avi Gross via Python-list wrote:
> I have seen major struggles to get other character sets into
> languages. Any new language typically should have this built in from
> s
On Sat, 5 Mar 2022 at 10:28, Peter J. Holzer wrote:
>
> On 2022-03-04 11:34:07 +1100, Chris Angelico wrote:
> > On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
> > wrote:
> > > The drumbeat I keep hearing is that some people hear/see the same
> > > word as implying something else. ELSE is
On 2022-03-04 11:34:07 +1100, Chris Angelico wrote:
> On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
> wrote:
> > The drumbeat I keep hearing is that some people hear/see the same
> > word as implying something else. ELSE is ambiguous in the context it
> > is used.
>
> What I'm hearing is
To: python-list@python.org
Sent: Fri, Mar 4, 2022 5:22 pm
Subject: Re: Behavior of the for-else construct
On 04/03/2022 20:52, Avi Gross via Python-list wrote:
>
> I have an observation about exception handling in general. Some people use
> exceptions, including ones they create and t
On 2022-03-04 14:04:48 -0600, Om Joshi wrote:
> I'm not sure if anyone has mentioned it on this thread, but with
> respect to your comment about adding either on.empty or a decorator,
> the Django template syntax uses
>
> {% for x in iterator %}
> {{ x }}
> {% empty %}
> Empty
> {% endfor %}
>
On 2022-03-04 08:38:52 -0600, Tim Chase wrote:
> On 2022-03-04 11:55, Chris Angelico wrote:
> > In MS-DOS, it was perfectly possible to have spaces in file names
>
> DOS didn't allow space (0x20) in filenames unless you hacked it by
> hex-editing your filesystem (which I may have done a couple tim
On 2022-03-04 00:38:22 +, Avi Gross via Python-list wrote:
> I have seen major struggles to get other character sets into
> languages. Any new language typically should have this built in from
> scratch and should consider adding non-ASCII characters into the mix.
> Mathematicians often use lot
On 04/03/2022 20:52, Avi Gross via Python-list wrote:
I have an observation about exception handling in general. Some people use
exceptions, including ones they create and throw, for a similar idea. You might
for example try to use an exception if your first attempt fails that specifies
try
lows
something like:
result = for ...
That might return 0 or None if it was part of the language but it is not.
Avi (my current first name)
-Original Message-
From: Om Joshi
To: Avi Gross
Cc: python-list
Sent: Fri, Mar 4, 2022 3:04 pm
Subject: Re: Behavior of the for-else constru
On 03/03/2022 19.54, Rob Cliffe wrote:
On 04/03/2022 01:44, Ethan Furman wrote:
On 3/3/22 5:32 PM, Rob Cliffe via Python-list wrote:
> There are three types of programmer: those that can count, and those that
can't.
Actually, there are 10 types of programmer: those that can count in binary,
On Sat, 5 Mar 2022 at 07:52, Avi Gross wrote:
>
> Chris,
>
> My example was precisely what to do when it is an empty closet:
Does it correctly handle a closet with shirts in it, though?
There's not a lot of point demonstrating an alternate use for the
"else" clause when it is *absolutely identic
ye==4 after the
loop. The above loop would leave it as aye==None which keeps it from being
undefined. To decide if the loop ran at all would thus require further code
such as:
if aye == None:
...
Which leads me right back to wondering why the sentinel approach is so bad!
-----Origi
On 2022-03-04 at 11:14:29 -0500,
Dennis Lee Bieber wrote:
> Try to tell the difference between
>
> afileand
> afile
>
> when doing a directory listing.
Easy: log in over a 110 baud modem, where the characters take almost as
much time as the beep. ;-)
--
https://mail.python
sus translating it literally from a
> language like C rather than using the ideas common in python. The method
> chosen to implement the ELSE clause here may well be Pythonic and some of my
> attempts to show other ways may well not be. I am not one of those that find
> the current implem
-
From: Chris Angelico
To: python-list@python.org
Sent: Fri, Mar 4, 2022 12:46 pm
Subject: Re: Behavior of the for-else construct
On Sat, 5 Mar 2022 at 02:02, Tim Chase wrote:
>
> On 2022-03-04 11:55, Chris Angelico wrote:
> > In MS-DOS, it was perfectly possible to have spac
On Fri, 4 Mar 2022 08:38:52 -0600, Tim Chase
declaimed the following:
>DOS didn't allow space (0x20) in filenames unless you hacked it by
>hex-editing your filesystem (which I may have done a couple times).
>However it did allow you to use 0xFF in filenames which *appeared* as
>a space in most ch
On Sat, 5 Mar 2022 at 03:44, Avi Gross via Python-list
wrote:
>
> Dieter,
>
> Your use is creative albeit it is not "needed" since all it does is make sure
> your variable is initialized to something, specifically None.
>
> So would this not do the same thing?
>
> eye = None
>
> for eye in ra
On Sat, 5 Mar 2022 at 02:02, Tim Chase wrote:
>
> On 2022-03-04 11:55, Chris Angelico wrote:
> > In MS-DOS, it was perfectly possible to have spaces in file names
>
> DOS didn't allow space (0x20) in filenames unless you hacked it by
> hex-editing your filesystem (which I may have done a couple t
Avi Gross wrote at 2022-3-4 16:43 +:
>Your use is creative albeit it is not "needed" since all it does is make sure
>your variable is initialized to something, specifically None.
>
>So would this not do the same thing?
>
> eye = None
>
> for eye in range(0):
> print(eye)
>
> eye
It wo
as discussed, you could do an IF statement to check if closet is empty but
for iterators, it gets ...
-Original Message-
From: Dieter Maurer
To: Rob Cliffe
Cc: python-list@python.org
Sent: Fri, Mar 4, 2022 2:12 am
Subject: Re: Behavior of the for-else construct
Rob Cliffe wrote at 2022-3
On 2022-03-04 11:55, Chris Angelico wrote:
> In MS-DOS, it was perfectly possible to have spaces in file names
DOS didn't allow space (0x20) in filenames unless you hacked it by
hex-editing your filesystem (which I may have done a couple times).
However it did allow you to use 0xFF in filenames wh
On Fri, 4 Mar 2022 at 21:02, gene heskett wrote:
> That makes the logic work, but who then cleans up the trash on the stack.
> Thats a memory leak.
>
Not sure I follow?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, 4 March 2022 02:18:51 EST Chris Angelico wrote:
> On Fri, 4 Mar 2022 at 18:13, Dieter Maurer wrote:
> > Rob Cliffe wrote at 2022-3-4 00:13 +:
> > >I find it so hard to remember what `for ... else` means that on the
> > >very few occasions I have used it, I ALWAYS put a comment
> > >
Op 4/03/2022 om 1:43 schreef Chris Angelico:
Think of it like this:
for item in search_list:
if condition: pass
else:
print("Condition not true for this item")
for item in search_list:
if condition: break
else:
print("Condition not true for any item")
There's a par
Op 4/03/2022 om 8:18 schreef Chris Angelico:
On Fri, 4 Mar 2022 at 18:13, Dieter Maurer wrote:
> One of my use cases for `for - else` does not involve a `break`:
> the initialization of the loop variable when the sequence is empty.
> It is demonstrated by the following transscript:
>
> ```pycon
On Fri, 4 Mar 2022 at 18:13, Dieter Maurer wrote:
>
> Rob Cliffe wrote at 2022-3-4 00:13 +:
> >I find it so hard to remember what `for ... else` means that on the very
> >few occasions I have used it, I ALWAYS put a comment alongside/below the
> >`else` to remind myself (and anyone else unfort
Rob Cliffe wrote at 2022-3-4 00:13 +:
>I find it so hard to remember what `for ... else` means that on the very
>few occasions I have used it, I ALWAYS put a comment alongside/below the
>`else` to remind myself (and anyone else unfortunate enough to read my
>code) what triggers it, e.g.
>
>
On Fri, 4 Mar 2022 at 14:37, Avi Gross via Python-list
wrote:
>
> That is one way to look at it, Jach. Of course, a particular loop may have
> multiple break statements each meaning something else. The current
> implementation makes all of them jump to the same ELSE statement so in one
> sense,
an ELSE dangling.
-Original Message-
From: Jach Feng
To: python-list@python.org
Sent: Thu, Mar 3, 2022 9:22 pm
Subject: Re: Behavior of the for-else construct
I never feel confused by "else" because I always think it in "break...else",
not "for...else".
On Fri, 4 Mar 2022 at 14:05, Avi Gross via Python-list
wrote:
> To answer something Chris said and was also mentioned here, I do not consider
> language design to be easy let alone implementing it. Not at all. BUT I think
> some changes can be straightforward. Having a symbol like a curly brace
hen you die and it simplifies.
-Original Message-
From: Rob Cliffe via Python-list
To: python-list@python.org
Sent: Thu, Mar 3, 2022 8:41 pm
Subject: Re: Behavior of the for-else construct
On 04/03/2022 00:38, Avi Gross via Python-list wrote:
> Rob,
>
> I regularly code with l
I never feel confused by "else" because I always think it in "break...else",
not "for...else". For those who always think in "for...else" deserves this
confusion and it can't be just escaped by replacing with another magic word
such as "then" or "finally" etc:-)
--Jach
--
https://mail.python.
On 04/03/2022 00:55, Chris Angelico wrote:
for victim in debtors:
if victim.pay(up): continue
if victim.late(): break
or else:
victim.sleep_with(fishes)
If you mean "or else" to be synonymous with "else", then only the last
debtor is killed, whether he has paid up or not, whic
On 04/03/2022 01:44, Ethan Furman wrote:
On 3/3/22 5:32 PM, Rob Cliffe via Python-list wrote:
> There are three types of programmer: those that can count, and those
that can't.
Actually, there are 10 types of programmer: those that can count in
binary, and those that can't.
1, 10, many.
On 4/03/22 1:55 pm, Chris Angelico wrote:
It's much better to treat arguments as a vector of strings
rather than a single string, as the start command tries to.
It would be nice if you could, but as I understand it, Windows always
passes arguments to a program as a single string, and then it's
On 3/3/22 5:32 PM, Rob Cliffe via Python-list wrote:
> There are three types of programmer: those that can count, and those that
can't.
Actually, there are 10 types of programmer: those that can count in binary,
and those that can't.
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/pyt
On 04/03/2022 00:43, Chris Angelico wrote:
On Fri, 4 Mar 2022 at 11:14, Rob Cliffe via Python-list
wrote:
I find it so hard to remember what `for ... else` means that on the very
few occasions I have used it, I ALWAYS put a comment alongside/below the
`else` to remind myself (and anyone else
ython-list
To: python-list@python.org
Sent: Thu, Mar 3, 2022 7:13 pm
Subject: Re: Behavior of the for-else construct
I find it so hard to remember what `for ... else` means that on the very
few occasions I have used it, I ALWAYS put a comment alongside/below the
`else` to remind myself (and anyo
On 04/03/2022 00:34, Chris Angelico wrote:
On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
wrote:
The drumbeat I keep hearing is that some people hear/see the same word as
implying something else. ELSE is ambiguous in the context it is used.
What I'm hearing is that there are, broad
n
NEVERTHELESS.
-Original Message-
From: Chris Angelico
To: python-list@python.org
Sent: Thu, Mar 3, 2022 7:34 pm
Subject: Re: Behavior of the for-else construct
On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
wrote:
>
> The drumbeat I keep hearing is that some people h
On Fri, 4 Mar 2022 at 11:39, Avi Gross via Python-list
wrote:
>
> Rob,
>
> I regularly code with lots of comments like the one you describe, or mark the
> end of a region that started on an earlier screen such as a deeply nested
> construct.
>
> I have had problems though when I have shared such
On Fri, 4 Mar 2022 at 11:14, Rob Cliffe via Python-list
wrote:
>
> I find it so hard to remember what `for ... else` means that on the very
> few occasions I have used it, I ALWAYS put a comment alongside/below the
> `else` to remind myself (and anyone else unfortunate enough to read my
> code) wh
Thu, Mar 3, 2022 7:13 pm
Subject: Re: Behavior of the for-else construct
I find it so hard to remember what `for ... else` means that on the very
few occasions I have used it, I ALWAYS put a comment alongside/below the
`else` to remind myself (and anyone else unfortunate enough to read my
code)
On Fri, 4 Mar 2022 at 10:09, Avi Gross via Python-list
wrote:
>
> The drumbeat I keep hearing is that some people hear/see the same word as
> implying something else. ELSE is ambiguous in the context it is used.
>
What I'm hearing is that there are, broadly speaking, two types of
programmers [1]
mes really expensive but also dangerous. A
"free" language must be added to sparingly and with so many requests, perhaps
only a few non bug-fixes can seriously be considered.
-Original Message-
From: Akkana Peck
To: python-list@python.org
Sent: Thu, Mar 3, 2022 5:33 pm
Subject: Re:
age must be added to sparingly and with so many requests, perhaps
only a few non bug-fixes can seriously be considered.
-Original Message-
From: Akkana Peck
To: python-list@python.org
Sent: Thu, Mar 3, 2022 5:33 pm
Subject: Re: Behavior of the for-else construct
computermaster360 writes
computermaster360 writes:
> I want to make a little survey here.
>
> Do you find the for-else construct useful?
No.
> Have you used it in practice?
Once or twice, but ended up removing it, see below.
> Do you even know how it works, or that there is such a thing in Python?
I always have to l
On 2022-03-03, computermaster360 wrote:
> Do you find the for-else construct useful? Have you used it in
> practice?
Yes, I use it frequently.
> I have used it maybe once. My issue with this construct is that
> calling the second block `else` doesn't make sense; a much more
> sensible name would
On 03/03/2022 07.24, computermaster360 wrote:
I want to make a little survey here.
Do you find the for-else construct useful? Have you used it in
practice? Do you even know how it works, or that there is such a thing
in Python?
I only found out about it within the last year or so. I've used it
On Thu, 3 Mar 2022 at 18:25, Schachner, Joseph
wrote:
> I don't know what that would be. "finally" is available 😊 Write up a
> feature request.
Not sure if you mean `finally` seriously but I think that would about
as confusing as the current `else`, if not even more 😅
Meanwhile, I found anoth
re request.
--- Joseph S.
Teledyne Confidential; Commercially Sensitive Business Data
-Original Message-
From: computermaster360
Sent: Thursday, March 3, 2022 8:24 AM
To: python-list@python.org
Subject: Behavior of the for-else construct
I want to make a little survey here.
Do you fi
computermaster360 wrote at 2022-3-3 14:24 +0100:
>Do you find the for-else construct useful?
Yes.
>Have you used it in practice?
Yes
--
https://mail.python.org/mailman/listinfo/python-list
It has occasional uses (I THINK I've used it myself) but spelling it
`else` is very confusing. So there have been proposals for an
alternative spelling, e.g. `nobreak`.
There have also been suggestions for adding other suites after `for', e.g.
if the loop WAS exited with `break`
if the
Op 3/03/2022 om 14:24 schreef computermaster360:
I want to make a little survey here.
Do you find the for-else construct useful? Have you used it in
practice? Do you even know how it works, or that there is such a thing
in Python?
- No, or at least not when balanced against the drawbacks as I pe
On 2022-03-03, computermaster360 wrote:
> Do you find the for-else construct useful?
Yes.
> Have you used it in practice?
Yes.
I don't use it often, but I do use it occasionally.
However, I always have to look it up the docs to confirm the logic. I
always feel like the else should be execute
On 2022-03-04 02:02, Chris Angelico wrote:
>> I want to make a little survey here.
>>
>> Do you find the for-else construct useful? Have you used it in
>> practice? Do you even know how it works, or that there is such a
>> thing in Python?
>
> Yes, yes, and yes-yes. It's extremely useful.
Just
> On 3 Mar 2022, at 13:24, computermaster360
> wrote:
>
> I want to make a little survey here.
>
> Do you find the for-else construct useful?
No. I always have to look up what condition the else fires on.
> Have you used it in
> practice?
No.
> Do you even know how it works, or that ther
On Fri, 4 Mar 2022 at 00:25, computermaster360
wrote:
>
> I want to make a little survey here.
>
> Do you find the for-else construct useful? Have you used it in
> practice? Do you even know how it works, or that there is such a thing
> in Python?
Yes, yes, and yes-yes. It's extremely useful.
>
On Thu, Mar 3, 2022 at 5:24 AM computermaster360 <
computermaster...@gmail.com> wrote:
> I want to make a little survey here.
>
> Do you find the for-else construct useful? Have you used it in
> practice? Do you even know how it works, or that there is such a thing
> in Python?
>
> I have used it
I want to make a little survey here.
Do you find the for-else construct useful? Have you used it in
practice? Do you even know how it works, or that there is such a thing
in Python?
I have used it maybe once. My issue with this construct is that
calling the second block `else` doesn't make sense;
84 matches
Mail list logo