Observations on the List - "Be More Kind"

2018-10-05 Thread Bruce Coram
I will declare at the outset, I am a lurker.  I don't know enough about 
Python to give advice that I could 100% guarantee would be helpful.


There have been two recent threads that summarise for me where the 
Python Mailing List has lost its way (and this started before Trump 
arrived as a new role model for how to treat your fellow man):


"Re: This thread is closed [an actual new thread]"

"Re: So apparently I've been banned from this list"

The level of vitriol and personal attacks on the moderators was 
profoundly disappointing, but not totally out of character for those who 
made the attacks.  There is no doubt that these people know software and 
Python and this certainly earns my respect,  but perhaps they need to 
retain a sense of perspective.  There are 7 billion people in the 
world.  There are plenty more people at least as good as you and many 
better, but they don't have the compelling urge to demonstrate their 
genius.  They get on with their work in a quiet professional manner.


Some humility in acknowledging that you stand on the shoulders of giants 
would not go amiss.  It might also reflect that you understand the good 
fortune that dealt you such a good hand in life.


You aren't always right, and you don't always have to insist on being 
right.  I found Steve D'Aprano always had to have the last word and had 
to prove he was right.  I found some of his posts to be intemperate in tone.


Why is there a need to score points with caustic remarks or throwaway 
comments?  Perhaps the person who posed his question should have read 
the documents, perhaps he should have searched the archives.  Tell them 
so politely and firmly.  If you cannot manage that then why say 
anything?  Not everyone who posts a poorly prepared question is idle and 
deserves a response that is less than polite.  Prepare a boilerplate 
standard reply that is polite for those questions that are easily 
resolved by the poster.


Perhaps the person who posts something you regard as nonsense is 
ignorant and lacks the knowledge they think they possess.  Instead of 
wasting your time with scholastic debate, put the time to good use 
improving your education in subjects you don't excel at.  I can 
guarantee the depth of your ignorance will be profound - there will be 
much for you to learn.  The effort some of you put in to the endless 
debates suggests that you have plenty of time on your hands - don't 
waste it.  It will be gone soon enough.


Don't waste time on the trolls, some of whom undoubtedly enjoy the 
ability to provoke a response.  Develop a greater sense of self 
awareness to enable you to recognise that you are being played.  The 
intemperate tone of some of the exchanges damages the reputation of the 
List.


Life is hard enough without us adding to it.  Try silence as a response.

Listen to Frank Turner's latest album: "Be More Kind".   That is not a 
plug to buy the album, but the title seems apposite - and the music is good.


Regards

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


Re: c[:]()

2007-06-02 Thread Bruce Coram
I am a relative newbie to Python and certainly to this mailing list.  I 
have watched this thread with interest.  After the first few exchanges I 
thought it would prove interesting and it has.

Warren Stringer is one of two things:

A joker having some fun at your expense.

An intellectually pretentious person who is so self absorbed that he is 
mentally incapable of seeing the hollowness of his ideas.

Either way it's probably not worth spending any more time on him.  All 
that needs to be said has been.  This thread is bare.

Exit

Bruce Coram
> 2007/6/1, Warren Stringer <[EMAIL PROTECTED]>:
>
>   
>> I am not insisting on anything. I use ``c[:]()`` as shorthand way of saying
>> "c() for c in d where d is a container"
>>
>> Having c() support containers seems obvious to me. It jibes with duck
>> typing. Perhaps the title of this thread should have been: "Why don't
>> containers quack?"
>>
>> A change is surprising only if it breaks something. I still haven't seen any
>> code that breaks by making such a change. Seeing such code would teach a
>> great deal.
>> 
>
> I think it very much bites duck typing. Currently, if I try to execute
> a string or a list or whatever, I get:
>
> TypeError: 'str' object is not callable
>
> But under your proposed semantics, suppose a is a list with some
> executable and some non-executable elements. What should
>
> a()
>
> now give? It cannot be a TypeError, because a list (in your semantics)
> is callable. Whatever error it gives, and whether or not the preceding
> executables are executed first, it will not be an existing error
> acting the way it normally does - there is no Python error for "you
> cannot do this with this object, but you can do it with other objects
> of the same type". And that does not seem to be a case of "We have
> never needed it yet" - the join method seems to have been specifically
> tailored so that no such error is needed.
>
>
>   


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


Re: new style class

2007-12-08 Thread Bruce Coram
Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> Nigel Rantor  <[EMAIL PROTECTED]> wrote:
>   
>> I think what Boris was being exceedingly unhelpful in saying was "why 
>> should it work when you're calling methods that do not exist"
>> 
>
> http://www.catb.org/~esr/faqs/smart-questions.html
>   
Eric Raymond's advice on how to ask questions the smart way would seem 
to provide an excuse for people with ego control problems to indulge 
themselves at the expense of others.  While it is undoubtedly true that 
there are people who post who should spend more time reading and 
researching the problem, that is no excuse for replies that  are rude, 
hostile or exhibit similar displays of ill-tempered arrogance.  Eric 
Raymond should perhaps re-read his advice and re-draft it to avoid 
providing cover for those 'experts' who are either rude or ignorant - or 
both.   If an 'expert' has time to indulge his/her ego is such an 
intemperate manner then he/she probably doesn't have enough to do, or 
enjoys being rude.  The best response to those who can not be bothered 
to do the necessary work is either no reply or a simple "You would be 
well advised to do some research before asking your question."   We do 
not need to make life any more difficult than it already is.  Civility 
costs nothing.  Eric Raymond's article, which offer's good advice, is 
rather misguided in not only providing an excuse for poor behaviour but 
almost actively encouraging it.  This is a pity since the essence of the 
document is very good advice.

Bruce Coram

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


Re: new style class

2007-12-12 Thread Bruce Coram
Steven

Regrettably I have to reply to your post because it misses the point of 
my initial post completely.  I suggested that Eric Raymond's advice 
provided cover for people who were rude, hostile or arrogant.  There are 
two obvious responses:  his advice does not provide such cover or it 
does but it does not matter.  It make no assertions about any particular 
person or group of persons.  It merely suggests that people who were 
disposed to rudeness could point to his article as supporting their 
approach.  It was a plea that we conduct ourselves in a civil manner and 
treat other people with respect.

I might be justified in assuming that you have spent some time working 
with politicians because you impute arguments to me that I do not make.  
At no point do I suggest that pointing somebody at Eric Raymond's advice 
is rude, hostile or arrogant, and your interpretation of my words to 
arrive at this is perverse.  It may be that English is not your first 
language in which case such a slip could be excused.  If not, it is 
evidence either of slipshod thinking or wilfull manipulation and 
obfuscation. If it is the latter then the post does not sit well in a 
forum that strives for accuracy.

Had I written:
The best response to those who *we assume* can not be bothered  to do 
the necessary work is either no reply or a simple "You would be  well 
advised to do some research before asking your question."

you would be justified in claiming that my advice was not to give any 
advice. I did not include the words 'we assume' and therefore my advice 
either to stop replying or to give a polite sign off was based on there 
being evidence that a person seeking advice could not be bothered i.e. 
there had been sufficient contact to allow that conclusion to be drawn 
in a reasonable manner.  English is a language that permits great 
precision in conveying meaning.  However, it is necessary on occasions 
to do some work and thinking in order to extract the writer's idea.

You also seem to have overlooked that I state twice that Eric Raymond's 
advice is good or very good.

I have no desire to to indulge in online verbal brawling but please take 
more care in drafting a reply, particularly in a situation where your 
interpretation of my post might lead others who post to believe that I 
thought them rude, hostile or arrogant.

Bruce Coram



Steven D'Aprano wrote:
> On Sat, 08 Dec 2007 23:14:44 +, Bruce Coram wrote:
>
>   
>>> http://www.catb.org/~esr/faqs/smart-questions.html
>>>   
>>>   
>> Eric Raymond's advice on how to ask questions the smart way would seem
>> to provide an excuse for people with ego control problems to indulge
>> themselves at the expense of others.  While it is undoubtedly true that
>> there are people who post who should spend more time reading and
>> researching the problem, that is no excuse for replies that  are rude,
>> hostile or exhibit similar displays of ill-tempered arrogance.
>> 
>
> Pointing somebody at Eric Raymond's advice is neither rude, hostile or 
> arrogant. It may be brusque. It may fail to sugar-coat the message 
> sufficiently, and hurt some recipient's feelings, but that's their 
> problem, not that of the sender.
>
>
>   
>> Eric
>> Raymond should perhaps re-read his advice and re-draft it to avoid
>> providing cover for those 'experts' who are either rude or ignorant - or
>> both.
>> 
>
> Why don't you do so yourself? He solicits suggestions and revisions.
>
> Or ask for permission to fork the document and come up with your own. 
> (You have to ask first, because as far as I can see the document is not 
> released with an open licence.)
>
>
>   
>> If an 'expert' has time to indulge his/her ego is such an
>> intemperate manner then he/she probably doesn't have enough to do, or
>> enjoys being rude.  
>> 
>
> Dare I suggest that perhaps YOU should read smart-questions? In 
> particular, the bits where Raymond writes about RTFM:
>
> "You shouldn't be offended by this; by hacker standards, your respondent 
> is showing you a rough kind of respect simply by not ignoring you. You 
> should instead be thankful for this grandmotherly kindness."
>
> Pointing somebody at smart-questions is a rather more polite form of RTFM.
>
>
>   
>> The best response to those who can not be bothered
>> to do the necessary work is either no reply 
>> 
>
> Ignoring people's request for help to punish them for poor behaviour is 
> not only rude but it is counter-productive. Not only do you not solve 
> their immediate problem, but you keep them in a state of ignorance as to 
> why they are being shunned

Unexpected Behaviour using unittest

2008-02-22 Thread Bruce Coram
The code fragment below shows what appears to be inconsistent 
behaviour.  The code is testing  that messages are created correctly and 
that an instances of a class is created correctly.  It checks that all 
of the expected addresses are used (contained in addresslist) and that 
all of the messages are used (contained in msglist).  If the data in 
msglist that appears in the list in the dictionary whose first key is  
'Sonar  Main' is a simple list of two items the test behaves as expected 
and passes.  However, if the data is enclosed within a tuple such that 
the list only contains the tuple, which contains the two values, the 
test fails.  The first of these two values is a class object and the 
code tests whether the instance of this class is created correctly 
locally and that test is passed in both cases.  The test fails because 
the msglist item for 'Sonar Main'  is not deleted.  I have included an 
example of the 'Sonar Main' data and also the test output.  I can not 
explain this behaviour and while it is not a showstopper I need to 
understand why.  The same behaviour is shown elsewhere if a list of four 
items is grouped into two tuples each of two items.  Grateful for any 
comments/explanations.

CODE FRAGMENT:

   msglist = [{'Helm': {'init': (80, 80, 0, 12, 140, 20)}},
{'UAW Director': {'init': (80, 80, 0, 12, 140, 20), 
'sonar_a': ['std'], 'sub_attack': ['std']}},
{'Gun Director': {'guns_s': ['std'], 'init': (80, 80, 0, 12, 
140, 20), 'guns_mr': ['std'], 'guns_aa': ['std']}},
{'Sonar Main': {'sonar_s': [DummySonar, 0]}}, {'Surface Radar 
Operator': {'radar_s': ['std']}}]
addresslist = ['127.10.2.2', '127.10.2.1', '127.10.2.5', 
'127.10.2.4', '127.10.2.3']
for entry in msgs:
if entry[1] in addresslist:
addresslist.remove(entry[1])
if entry[0]['set role'] in msglist:
if entry[0]['set role'].keys() == ['Sonar Main']:
print 'keys = ', entry[0]['set role'].keys()
if not 
isinstance(self.newprocessor.vessel.uwsearch.sonar_search, 
shipserverclasses.DummySonar):
Pass = False
print '1', 
type(self.newprocessor.vessel.uwsearch.sonar_search)
print 'removing msg ', entry[0]['set role']
msglist.remove(entry[0]['set role'])
else:
print 'removing msg ', entry[0]['set role']
msglist.remove(entry[0]['set role'])
if addresslist != []:
Pass = False
print '2', addresslist
if msglist != []:
Pass = False
print '3', msglist
self.failUnless(Pass == True)



Data fragment - passed:

{'Sonar Main': {'sonar_s': [DummySonar, 0]}}

Test Output:

testAllConnectedUWsearchChange2 
(__main__.TestMsgProcessesShipServerSetType) ...
 removing msg  {'Helm': {'init': (80, 80, 0, 12, 140, 20)}}
removing msg  {'UAW Director': {'init': (80, 80, 0, 12, 140, 20), 
'sonar_a': ['s
td'], 'sub_attack': ['std']}}
keys =  ['Sonar Main']
removing msg  {'Sonar Main': {'sonar_s': [
, 0]}}
removing msg  {'Gun Director': {'guns_s': ['std'], 'init': (80, 80, 0, 
12, 140,
20), 'guns_mr': ['std'], 'guns_aa': ['std']}}
removing msg  {'Surface Radar Operator': {'radar_s': ['std']}}
ok

--

Data fragment - failed:

{'Sonar Main': {'sonar_s': [(DummySonar, 0)]}}

Test Output:

testAllConnectedUWsearchChange2 
(__main__.TestMsgProcessesShipServerSetType) ...
 removing msg  {'Helm': {'init': (80, 80, 0, 12, 140, 20)}}
removing msg  {'UAW Director': {'init': (80, 80, 0, 12, 140, 20), 
'sonar_a': ['s
td'], 'sub_attack': ['std']}}
removing msg  {'Gun Director': {'guns_s': ['std'], 'init': (80, 80, 0, 
12, 140,
20), 'guns_mr': ['std'], 'guns_aa': ['std']}}
removing msg  {'Surface Radar Operator': {'radar_s': ['std']}}
3 [{'Sonar Main': {'sonar_s': [(, 
0)]}}]
FAIL

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