[RELEASE] Python 3.7.1rc1 and 3.6.7rc1 now available for testing

2018-09-26 Thread Ned Deily
Python 3.7.1rc1 and 3.6.7rc1 are now available. 3.7.1rc1 is the release
preview of the first maintenance release of Python 3.7, the latest feature
release of Python. 3.6.7rc1 is the release preview of the next maintenance
release of Python 3.6, the previous feature release of Python. Assuming no
critical problems are found prior to 2018-10-06, no code changes are
planned between these release candidates and the final releases. These
release candidates are intended to give you the opportunity to test the
new security and bug fixes in 3.7.1 and 3.6.7. We strongly encourage you
to test your projects and report issues found to bugs.python.org as soon
as possible.

Please keep in mind that these are preview releases and, thus, their use
is not recommended for production environments.

You can find these releases and more information here:
https://www.python.org/downloads/release/python-371rc1/
https://www.python.org/downloads/release/python-367rc1/

--
  Ned Deily
  n...@python.org -- []

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Re[2]: [OT] master/slave debate in Python

2018-09-26 Thread Ian Kelly
On Wed, Sep 26, 2018 at 3:10 PM Brian Grawburg  wrote:
>
> This is right next to the objection of the use male and female to describe 
> the two parts of a connector. I lament that snowflakes and such are trying 
> desperately to enforce their quest for radical egalitarianism and see hidden 
> agendas behind just about everything---except their own, of course.

The only person who has said *anything* about "hidden agendas" here is
you. Projecting much?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Larry Martell
On Wed, Sep 26, 2018 at 4:41 AM, Brian Oney via Python-list
 wrote:
> "I have a vewwy great fwiend in Wome called 'Biggus Dickus'"
> ...
> "Can I go now, sir?"

He has a wife, you know. You know what she's called? She's called...
'Incontinentia'. 'Incontinentia Buttocks'.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Chris Angelico
On Thu, Sep 27, 2018 at 7:05 AM Ian Kelly  wrote:
>
> On Tue, Sep 25, 2018 at 10:48 PM Chris Angelico  wrote:
> >
> > On Wed, Sep 26, 2018 at 2:36 PM Ian Kelly  wrote:
> > > So, Chris, what have *you personally* done about real slavery where it
> > > still happens?
> > >
> > > If, as I'm guessing, the answer is "nothing" then it seems to me that
> > > you don't have much of a leg to stand on to level this accusation.
> >
> > Am I demanding that the terminology be changed? No? Then I don't think
> > the accusation applies.
>
> You're objecting to people trying to do *something* positive on the
> grounds that they're not doing *more* while you yourself are doing
> *nothing*. That's pretty hypocritical.

You're assuming that it's something positive that's being done. That
is an unproven assertion. I'm objecting to people creating churn on
the grounds that they're not accomplishing anything.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: clever exit of nested loops

2018-09-26 Thread Mark Lawrence

On 26/09/18 08:50, vito.detul...@gmail.com wrote:

Hi
Today I've added a couple of lines in my source code, and I'm very ashamed of 
it.
it "runs", and I know what it does (for now), but it's "too clever".
I have "abused" the "else" clause of the loops to makes a break "broke" more 
loops


 for i in range(10):
 print(f'i: {i}')
 for j in range(10):
 print(f'\tj: {j}')
 for k in range(10):
 print(f'\t\tk: {k}')

 if condition(i, j, k):
 break

 else:# if there weren't breaks in the inner loop,
 continue # then make anoter outer loop,
 break# else break also the outer one

 else:
 continue
 break

the "magic" is in that repeated block... it's so convoluted to read... still it's very 
useful to omit "signals" variables or the need to refactor it in a function with an 
explicit return or other solutions.

is there any chance to extends the python grammar to allow something like


 for i in range(10) and not break:
 print(f'i: {i}')
 for j in range(10) and not break:
 print(f'\tj: {j}')
 for k in range(10):
 print(f'\t\tk: {k}')

 if condition(i, j, k):
 break


with the semantics of break a loop if an inner loop "broke"?

  



To me the Ned Batchelder presentation 
https://www.youtube.com/watch?v=EnSu9hHGq5o "Loop like a Native" is the 
definitive way on how to deal with loops in Python.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Re[2]: [OT] master/slave debate in Python

2018-09-26 Thread Brian Grawburg
This is right next to the objection of the use male and female to describe the 
two parts of a connector. I lament that snowflakes and such are trying 
desperately to enforce their quest for radical egalitarianism and see hidden 
agendas behind just about everything---except their own, of course.



Brian Grawburg
Wilson, NC



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Ian Kelly
On Tue, Sep 25, 2018 at 10:48 PM Chris Angelico  wrote:
>
> On Wed, Sep 26, 2018 at 2:36 PM Ian Kelly  wrote:
> > So, Chris, what have *you personally* done about real slavery where it
> > still happens?
> >
> > If, as I'm guessing, the answer is "nothing" then it seems to me that
> > you don't have much of a leg to stand on to level this accusation.
>
> Am I demanding that the terminology be changed? No? Then I don't think
> the accusation applies.

You're objecting to people trying to do *something* positive on the
grounds that they're not doing *more* while you yourself are doing
*nothing*. That's pretty hypocritical.

> > Imagine if the terminology were instead "dominant / submissive".
> > Without meaning to assume too much, might the cultural context
> > surrounding those terms make you feel uncomfortable when using them?
> > Would you desire for something else to be used in their place? Well,
> > there are plenty of people who feel exactly that way about "master /
> > slave".
>
> I wouldn't care.

Then why not just use those terms instead?

> > Here's the reality: the change may be difficult for some while it's
> > happening, because people don't like being told that the way they're
> > accustomed to doing something is harmful. But a few years from now,
> > after everything has settled, nobody will be looking back at this and
> > saying "oh, I wish we still used master/slave in the documentation.
> > Primary/replica (or whatever else replaces it) just doesn't sound as
> > good."
> >
> > Honestly, it's absurd that this is even a debate. Let's just make the
> > change and get it over with.
>
> And what happens when "replica" becomes pejorative? Do we change words again?

I think it's pretty obvious why "slave" has a negative connotation.
Why on Earth would "replica" ever become pejorative?

I suppose in that case we would curse Philip K. Dick and start over again.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Brian Oney via Python-list
> PS: I'm not a great fan of it, but I think we all know that off-topic is 
> in a way what this list excels at.
+1

An open source community thrives on being open. It also welcomes those who like 
to pick a fight for various, usually personal reasons.

Has any heard of that Python language? I hear they named it after a person's 
pretty snake. No? Okay.

"I have a vewwy great fwiend in Wome called 'Biggus Dickus'"
...
"Can I go now, sir?"

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Dan Purgert
David Raymond wrote:
> [...]
> HAL.open(ship.pod_bay.doors)

I'm sorry Dave, I'm afraid I can't do that.

-- 
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: [OT] master/slave debate in Python

2018-09-26 Thread David Raymond
...Think about how you treat your computers - you have the power to discard 
them if they do not work correctly, or even if you just want to get a newer 
one. You have the power to kick them across the room and nobody will arrest 
you. Maybe you don't do those things (I would hope you don't kick computers 
around), but the computer has no say in that...

...At least, not yet...

HAL.open(ship.pod_bay.doors)



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Chris Angelico
On Thu, Sep 27, 2018 at 1:28 AM Ian Kelly  wrote:
>
> On Wed, Sep 26, 2018 at 7:49 AM Chris Angelico  wrote:
> >
> > On Wed, Sep 26, 2018 at 11:33 PM Ian Kelly  wrote:
> > >
> > > Care to give an example? The distinctive part of the definition of
> > > "slave" is that it refers to someone who is owned and/or held captive,
> > > and forced to work against their will. I can think of no situation in
> > > programming in which the word is particularly apt, because the trait
> > > of "lack of freedom" is just not something that comes up. There is
> > > always a word choice available that is not only more sensitive, but
> > > more accurate as well.
> >
> > Lack of freedom? That's exactly what happens *frequently* in any
> > job-farming situation. For instance, suppose you have an
> > embarrassingly parallel task to perform - let's say it's some kind of
> > search for correctness, where as soon as you attempt something, you
> > know whether it's correct or not. (Examples include crypto, searching
> > for prime numbers, finding patterns, etc, etc.) A master process hands
> > out tasks to slave processes; the slaves have no freedom, but must
> > simply do as they're told.
>
> The master also must do what it's told. This isn't a characterization
> of the relationship between processes; it's just the nature of
> programming.
>
> I see you addressed that point below, but note that subordinate
> processes *can* often reject tasks. It might be because "I ran out of
> memory", or it might be because "I'm already doing something", or even
> because "I hadn't heard from you in a while so I assumed there was a
> connectivity problem or that your process died, and I correspondingly
> initiated an election among my peers and now I'm the master node".

Yes, I do address the point, and what you've said here is proof that
"master" and "slave" indicate a relationship, not a permanent
situation. Computers and software can adopt an Elbonian approach to
slavery:

http://dilbert.com/strip/2010-08-28

> > Or you can slave a number of backup
> > database servers to a master, where the master is in charge of
> > everything, and the slaves simply follow orders, thus creating perfect
> > replicas. While it's sometimes correct to talk about "primary" and
> > "replica", it's also accurate to describe *all* the nodes as replicas
> > (since they're all identical); and it's entirely possible to have more
> > than one master, so there isn't really a "primary". So there certainly
> > are situations in which "slave" is absolutely precisely correct.
>
> Your conclusion does not follow. Just because "primary" is not always
> the best term does not mean that "slave" automatically fills the role.

No, it doesn't follow. I described some situations where it IS
correct, but there are of course times when it isn't. That's simply
the nature of technical terminology.

> "Servant" and "slave" do not have the same connotation. While it's
> generally rude or offensive to refer to an individual as a servant,
> the use of the word is not seen as a slight to an entire subculture.

And "server" doesn't have the same connotation either, yet they all
ultimately mean the same thing.

> > So rather than removing every trace of the word "slave", how about
> > instead we go the other way: use it in so many contexts that it loses
> > its sting everywhere except when referring to humans. In fact, make it
> > such that a human slave is "a person being treated like a computer",
> > and thus obviously lacking in basic human rights.
>
> How about we also plaster the swastika (another symbol that carries
> "another meaning") all over everything, all while insisting that it's
> just a good luck symbol and that it shouldn't be associated with Nazis
> forever, and force anybody who finds it offensive to "get over it" or
> suffer in silence. I don't mean to Godwin the thread, but this is no
> different than what you're proposing.

Only if you can demonstrate that you're using it in a technically-accurate way.

> Also: a human slave is not "a person being treated like a computer"
> and I find it highly disrespectful that you would move to trivialize
> slavery like that.

Actually, if a human slave is being treated as someone who has no
will, no autonomy, no power to choose anything, s/he IS being treated
as a computer, and my point is to highlight that. Think about how you
treat your computers - you have the power to discard them if they do
not work correctly, or even if you just want to get a newer one. You
have the power to kick them across the room and nobody will arrest
you. Maybe you don't do those things (I would hope you don't kick
computers around), but the computer has no say in that. Am I
trivializing slavery? Or am I using a descriptive term that is
actually more accurate than you dare acknowledge?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: [OT] master/slave debate in Python

2018-09-26 Thread Schachner, Joseph
This really is an amazing discussion.  I actually do understand why "master" 
and "slave" might make people uncomfortable, although the meaning is quite 
clear.  Perhaps we need a currently used alternative:
1) Captain and Private
2) Manager and employee
3) CEO and Peon
4) Controller and Controlled
5) Commander and executer

You might not like any of these. That's OK, my goal was just to show that the 
relationship can be expressed without using outdated terms that some find 
objectionable.
These all have pretty much the same relationship (first one says what to do, 
second one does it) but I think any one of them feels more "comfortable" 
now-a-days than Master and Slave.

--- Joe S.

-Original Message-
From: Paul Moore  
Sent: Wednesday, September 26, 2018 11:41 AM
To: Ian Kelly 
Cc: Python 
Subject: Re: [OT] master/slave debate in Python

On Wed, 26 Sep 2018 at 16:30, Ian Kelly  wrote:

> Also: a human slave is not "a person being treated like a computer"
> and I find it highly disrespectful that you would move to trivialize 
> slavery like that.

I have no idea what it must feel like to be a slave (other than the trite and 
obvious idea that "it must be awful"). Unfortunately, debates like this do 
nothing to help me understand or empathise with the people suffering in that 
way, or people dealing with the aftermath of historical cases.

I'm more than happy to ensure that we are not causing pain or being 
disrespectful of the suffering of others, but rather than simply making the 
whole issue feel like a censorship debate, I'd rather we were helping people to 
understand and empathise, so that they would *of their own accord* act in an 
appropriate way. Self-censorship based on understanding and empathy is far more 
reasonable than any sort of externally-imposed rules.

But discussing what it means to be a slave, or the implications of slavery on 
our culture(s) is way off-topic for this list, so I'd prefer not to debate it 
further here. I'm sure anyone interested in understanding more can easily find 
more appropriate forums to participate in.

Paul

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Marko Rauhamaa
Ian Kelly :

> The terminology should be changed because it's offensive, full stop.
> It may be normalized to many who are accustomed to it, but that
> doesn't make it any less offensive.
>
> Imagine if the terminology were instead "dominant / submissive".
> Without meaning to assume too much, might the cultural context
> surrounding those terms make you feel uncomfortable when using them?
> Would you desire for something else to be used in their place? Well,
> there are plenty of people who feel exactly that way about "master /
> slave".

I'm not a great fan of word taboos.

In particular, you can't ban a word just because someone gets offended
by it.

> Honestly, it's absurd that this is even a debate. Let's just make the
> change and get it over with.

I agree that this debate sounds absurd, satirical even.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Paul Moore
On Wed, 26 Sep 2018 at 16:30, Ian Kelly  wrote:

> Also: a human slave is not "a person being treated like a computer"
> and I find it highly disrespectful that you would move to trivialize
> slavery like that.

I have no idea what it must feel like to be a slave (other than the
trite and obvious idea that "it must be awful"). Unfortunately,
debates like this do nothing to help me understand or empathise with
the people suffering in that way, or people dealing with the aftermath
of historical cases.

I'm more than happy to ensure that we are not causing pain or being
disrespectful of the suffering of others, but rather than simply
making the whole issue feel like a censorship debate, I'd rather we
were helping people to understand and empathise, so that they would
*of their own accord* act in an appropriate way. Self-censorship based
on understanding and empathy is far more reasonable than any sort of
externally-imposed rules.

But discussing what it means to be a slave, or the implications of
slavery on our culture(s) is way off-topic for this list, so I'd
prefer not to debate it further here. I'm sure anyone interested in
understanding more can easily find more appropriate forums to
participate in.

Paul
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Ian Kelly
On Wed, Sep 26, 2018 at 7:49 AM Chris Angelico  wrote:
>
> On Wed, Sep 26, 2018 at 11:33 PM Ian Kelly  wrote:
> >
> > Care to give an example? The distinctive part of the definition of
> > "slave" is that it refers to someone who is owned and/or held captive,
> > and forced to work against their will. I can think of no situation in
> > programming in which the word is particularly apt, because the trait
> > of "lack of freedom" is just not something that comes up. There is
> > always a word choice available that is not only more sensitive, but
> > more accurate as well.
>
> Lack of freedom? That's exactly what happens *frequently* in any
> job-farming situation. For instance, suppose you have an
> embarrassingly parallel task to perform - let's say it's some kind of
> search for correctness, where as soon as you attempt something, you
> know whether it's correct or not. (Examples include crypto, searching
> for prime numbers, finding patterns, etc, etc.) A master process hands
> out tasks to slave processes; the slaves have no freedom, but must
> simply do as they're told.

The master also must do what it's told. This isn't a characterization
of the relationship between processes; it's just the nature of
programming.

I see you addressed that point below, but note that subordinate
processes *can* often reject tasks. It might be because "I ran out of
memory", or it might be because "I'm already doing something", or even
because "I hadn't heard from you in a while so I assumed there was a
connectivity problem or that your process died, and I correspondingly
initiated an election among my peers and now I'm the master node".

> Or you can slave a number of backup
> database servers to a master, where the master is in charge of
> everything, and the slaves simply follow orders, thus creating perfect
> replicas. While it's sometimes correct to talk about "primary" and
> "replica", it's also accurate to describe *all* the nodes as replicas
> (since they're all identical); and it's entirely possible to have more
> than one master, so there isn't really a "primary". So there certainly
> are situations in which "slave" is absolutely precisely correct.

Your conclusion does not follow. Just because "primary" is not always
the best term does not mean that "slave" automatically fills the role.

> Technically, *all* computers lack freedom. But in order to make a
> useful distinction here, it's easiest to define "slave" as something
> that follows the orders of another program, having no *human*
> interaction - in other words, "autonomy" really means "taking orders
> from a human". So it's really a hierarchy, with humans at the top, and
> a cascade of masters giving orders to slaves, and sometimes those
> slaves are themselves the masters of other slaves. (Consider the
> Gospel of Matthew, chapter 8, in which Jesus talks to a centurion
> about the meaning of authority; the centurion, being a military man,
> understands that being a master does not mean he never takes orders.)
> The terms "master" and "slave" refer to a specific relationship
> between two programs or machines, just as "server" and "client" do (my
> program could be an X11 client and an HTTP server, for instance).
> Actually, "server" literally means the same thing as "servant" or
> "slave", and the only reason it hasn't been excised from the language
> is that somehow the non-offensive meaning has become sufficiently
> dominant that people would laugh at the implication that it should be
> removed.

"Servant" and "slave" do not have the same connotation. While it's
generally rude or offensive to refer to an individual as a servant,
the use of the word is not seen as a slight to an entire subculture.

> So rather than removing every trace of the word "slave", how about
> instead we go the other way: use it in so many contexts that it loses
> its sting everywhere except when referring to humans. In fact, make it
> such that a human slave is "a person being treated like a computer",
> and thus obviously lacking in basic human rights.

How about we also plaster the swastika (another symbol that carries
"another meaning") all over everything, all while insisting that it's
just a good luck symbol and that it shouldn't be associated with Nazis
forever, and force anybody who finds it offensive to "get over it" or
suffer in silence. I don't mean to Godwin the thread, but this is no
different than what you're proposing.

Also: a human slave is not "a person being treated like a computer"
and I find it highly disrespectful that you would move to trivialize
slavery like that.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Chris Angelico
On Wed, Sep 26, 2018 at 11:33 PM Ian Kelly  wrote:
>
> On Wed, Sep 26, 2018 at 2:01 AM David Palao  wrote:
> >
> > Hello,
> > My opinion is that the terms "master/slave" describe well some situations.
> > They could be seen by some people as offensive (although unfortunately
> > sometimes true, even today) when applied to persons. But it is not
> > offensive when applied to processes in a computer. They are not living
> > entities.
> >
> > I would say that when talking about programming, the terms have a
> > perfect meaning.
>
> Care to give an example? The distinctive part of the definition of
> "slave" is that it refers to someone who is owned and/or held captive,
> and forced to work against their will. I can think of no situation in
> programming in which the word is particularly apt, because the trait
> of "lack of freedom" is just not something that comes up. There is
> always a word choice available that is not only more sensitive, but
> more accurate as well.

Lack of freedom? That's exactly what happens *frequently* in any
job-farming situation. For instance, suppose you have an
embarrassingly parallel task to perform - let's say it's some kind of
search for correctness, where as soon as you attempt something, you
know whether it's correct or not. (Examples include crypto, searching
for prime numbers, finding patterns, etc, etc.) A master process hands
out tasks to slave processes; the slaves have no freedom, but must
simply do as they're told. Or you can slave a number of backup
database servers to a master, where the master is in charge of
everything, and the slaves simply follow orders, thus creating perfect
replicas. While it's sometimes correct to talk about "primary" and
"replica", it's also accurate to describe *all* the nodes as replicas
(since they're all identical); and it's entirely possible to have more
than one master, so there isn't really a "primary". So there certainly
are situations in which "slave" is absolutely precisely correct.

Technically, *all* computers lack freedom. But in order to make a
useful distinction here, it's easiest to define "slave" as something
that follows the orders of another program, having no *human*
interaction - in other words, "autonomy" really means "taking orders
from a human". So it's really a hierarchy, with humans at the top, and
a cascade of masters giving orders to slaves, and sometimes those
slaves are themselves the masters of other slaves. (Consider the
Gospel of Matthew, chapter 8, in which Jesus talks to a centurion
about the meaning of authority; the centurion, being a military man,
understands that being a master does not mean he never takes orders.)
The terms "master" and "slave" refer to a specific relationship
between two programs or machines, just as "server" and "client" do (my
program could be an X11 client and an HTTP server, for instance).
Actually, "server" literally means the same thing as "servant" or
"slave", and the only reason it hasn't been excised from the language
is that somehow the non-offensive meaning has become sufficiently
dominant that people would laugh at the implication that it should be
removed.

So rather than removing every trace of the word "slave", how about
instead we go the other way: use it in so many contexts that it loses
its sting everywhere except when referring to humans. In fact, make it
such that a human slave is "a person being treated like a computer",
and thus obviously lacking in basic human rights.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Ian Kelly
On Wed, Sep 26, 2018 at 2:01 AM David Palao  wrote:
>
> Hello,
> My opinion is that the terms "master/slave" describe well some situations.
> They could be seen by some people as offensive (although unfortunately
> sometimes true, even today) when applied to persons. But it is not
> offensive when applied to processes in a computer. They are not living
> entities.
>
> I would say that when talking about programming, the terms have a
> perfect meaning.

Care to give an example? The distinctive part of the definition of
"slave" is that it refers to someone who is owned and/or held captive,
and forced to work against their will. I can think of no situation in
programming in which the word is particularly apt, because the trait
of "lack of freedom" is just not something that comes up. There is
always a word choice available that is not only more sensitive, but
more accurate as well.

> Otherwise, what is the correct way to use the words
> master and slave? Not using them?

That would be my recommendation. Instead you could use "primary /
replica" or "primary / secondary" or "manager / subordinate" or
"client / agent" or whatever other word pair is appropriate for the
particular situation.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Léo El Amri via Python-list
On 26/09/2018 06:34, Ian Kelly wrote:
> Chris Angelico  wrote:
>> What I know about them is that they (and I am assuming there are
>> multiple people, because there are reports of multiple reports, if
>> that makes sense) are agitating for changes to documentation without
>> any real backing.
> 
> The terminology should be changed because it's offensive, full stop.
> It may be normalized to many who are accustomed to it, but that
> doesn't make it any less offensive.

Come on ! I have nothing to add to what Terry said:
https://bugs.python.org/msg324773

Now, the bug report is still pointing out some places in the code where
the master/slave terminology is misused, for _technical_ reasons. And
none of us should be blinded by the non-technical motive of the
bug-report. We should do what we have to do, and just let sink the rest
of it.

> Imagine if the terminology were instead "dominant / submissive".
> Without meaning to assume too much, might the cultural context
> surrounding those terms make you feel uncomfortable when using them?

I couldn't care less as well. The meaning of words is given by the context.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread D'Arcy Cain
On 9/26/18 3:58 AM, David Palao wrote:
> Hello,
> My opinion is that the terms "master/slave" describe well some situations.
> They could be seen by some people as offensive (although unfortunately
> sometimes true, even today) when applied to persons. But it is not
> offensive when applied to processes in a computer. They are not living
> entities.

Exactly.  It's like the word "bitch".  It's a perfectly good word when
used correctly but extremely offensive when applied to women.  Maybe we
should change the name of the language because calling someone a snake
is pejorative.  I bet the PC police could find many words in the
language that are offensive when applied to people.

Where is Lenny Bruce when we need him?

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: clever exit of nested loops

2018-09-26 Thread Peter Otten
vito.detul...@gmail.com wrote:

> Hi
> Today I've added a couple of lines in my source code, and I'm very ashamed
> of it. it "runs", and I know what it does (for now), but it's "too
> clever". I have "abused" the "else" clause of the loops to makes a break
> "broke" more loops
> 
> 
> for i in range(10):
> print(f'i: {i}')
> for j in range(10):
> print(f'\tj: {j}')
> for k in range(10):
> print(f'\t\tk: {k}')
> 
> if condition(i, j, k):
> break
> 
> else:# if there weren't breaks in the inner loop,
> continue # then make anoter outer loop,
> break# else break also the outer one
> 
> else:
> continue
> break
> 
> the "magic" is in that repeated block... it's so convoluted to read...
> still it's very useful to omit "signals" variables or the need to refactor
> it in a function with an explicit return or other solutions.
> 
> is there any chance to extends the python grammar to allow something like
> 
> 
> for i in range(10) and not break:

I think that is much too close to a logical expression. If I were to add a 
way to break out of an inner loop I'd introduce a fullblown (intra-function) 
goto.

So far I'm happy with generators; in my actual use cases something like

def g():
for i in range(10):
print(f'i: {i}')
for j in range(10):
print(f'\tj: {j}')
for k in range(10):
print(f'\t\tk: {k}')
yield i, j, k

for i, j, k in g():
if condition(i, j, k):
break

looks natural. Another option might be a dedicated exception:

class Break(Exception):
pass

try:
for i in range(10):
print(f'i: {i}')
for j in range(10):
print(f'\tj: {j}')
for k in range(10):
print(f'\t\tk: {k}')

if condition(i, j, k):
raise Break
except Break:
pass



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: clever exit of nested loops

2018-09-26 Thread Chris Angelico
On Wed, Sep 26, 2018 at 5:56 PM  wrote:
>
> Hi
> Today I've added a couple of lines in my source code, and I'm very ashamed of 
> it.
> it "runs", and I know what it does (for now), but it's "too clever".
> I have "abused" the "else" clause of the loops to makes a break "broke" more 
> loops
>
>
> for i in range(10):
> print(f'i: {i}')
> for j in range(10):
> print(f'\tj: {j}')
> for k in range(10):
> print(f'\t\tk: {k}')
>
> if condition(i, j, k):
> break
>
> else:# if there weren't breaks in the inner loop,
> continue # then make anoter outer loop,
> break# else break also the outer one
>
> else:
> continue
> break
>
> the "magic" is in that repeated block... it's so convoluted to read... still 
> it's very useful to omit "signals" variables or the need to refactor it in a 
> function with an explicit return or other solutions.
>
> is there any chance to extends the python grammar to allow something like
>
>
> for i in range(10) and not break:
> print(f'i: {i}')
> for j in range(10) and not break:
> print(f'\tj: {j}')
> for k in range(10):
> print(f'\t\tk: {k}')
>
> if condition(i, j, k):
> break
>
>
> with the semantics of break a loop if an inner loop "broke"?
>

Hmm. I'm not enamoured of it.

My normal solution is to put the whole thing into a function and use
"return" to bail out. But sometimes that's not possible; sometimes you
do need a better solution. I'm not sure this one is it, though.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread David Palao
Hello,
My opinion is that the terms "master/slave" describe well some situations.
They could be seen by some people as offensive (although unfortunately
sometimes true, even today) when applied to persons. But it is not
offensive when applied to processes in a computer. They are not living
entities.

I would say that when talking about programming, the terms have a
perfect meaning. Otherwise, what is the correct way to use the words
master and slave? Not using them?

Best


El dom., 23 sept. 2018 a las 17:00, Albert-Jan Roskam
() escribió:
>
> *sigh*. I'm with Hettinger on this.
>
> https://www.theregister.co.uk/2018/09/11/python_purges_master_and_slave_in_political_pogrom/
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


clever exit of nested loops

2018-09-26 Thread vito . detullio
Hi
Today I've added a couple of lines in my source code, and I'm very ashamed of 
it.
it "runs", and I know what it does (for now), but it's "too clever".
I have "abused" the "else" clause of the loops to makes a break "broke" more 
loops


for i in range(10):
print(f'i: {i}')
for j in range(10):
print(f'\tj: {j}')
for k in range(10):
print(f'\t\tk: {k}')

if condition(i, j, k):
break

else:# if there weren't breaks in the inner loop, 
continue # then make anoter outer loop,
break# else break also the outer one

else:
continue
break

the "magic" is in that repeated block... it's so convoluted to read... still 
it's very useful to omit "signals" variables or the need to refactor it in a 
function with an explicit return or other solutions.

is there any chance to extends the python grammar to allow something like


for i in range(10) and not break:
print(f'i: {i}')
for j in range(10) and not break:
print(f'\tj: {j}')
for k in range(10):
print(f'\t\tk: {k}')

if condition(i, j, k):
break


with the semantics of break a loop if an inner loop "broke"?

 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-09-26 Thread Robin Becker

On 25/09/2018 23:46, Thomas Jollans wrote:
..


I have to say I find these unspecified attacks on "SJWs" rather disturbing. Assuming for a moment that "SJW" is a viable insult 
(that's the way you appear to be using it, though I wouldn't use it myself, in that way or probably at all) -


Who is the "SJW brigade" of whom you speak?


...
It didn't take me very long to find a connection between this thread and this 
phrase

"I’m Tired of Being Tolerant"

on these issues I am with the Voltaireans.
--
Robin Becker

--
https://mail.python.org/mailman/listinfo/python-list