Re: ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol

2017-12-18 Thread Piyush Verma
Hi Chris, Yes it is HTTPS server. I was debugging and found some relevant
data which may help to identify the problem.

In my Mac OS, I have two version of openssl version installed. default was
/usr/bin/openssl, which i changed to brew installed one.
(virtenv) $ /usr/bin/openssl version
OpenSSL 0.9.8zh 14 Jan 2016
(virtenv) $ openssl version
OpenSSL 1.0.2n  7 Dec 2017

In my python code when I printed the ssl version, python still taking the
system installed ssl version in my Mac OS. I think same problem in my code,
how can I make python to understand to take latest ssl?
import ssl
ssl.OPENSSL_VERSION
'OpenSSL 0.9.8zh 14 Jan 2016'





Regards,
~Piyush
Facebook  Twitter


On Mon, Dec 18, 2017 at 2:49 AM, Chris Angelico  wrote:

> On Mon, Dec 18, 2017 at 6:28 AM, Piyush Verma <114piy...@gmail.com> wrote:
> > Yes Dieter, I see that it is connecting with 443 port number and service
> is
> > running. Is this related to python version or mac?
>
> Can you confirm that it really is an HTTPS server, not just an HTTP
> server that's running on port 443? Try accessing it using a web
> browser or some other program.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Repeated Names (Repeated Names)

2017-12-18 Thread Jon Ribbens
On 2017-12-17, Skip Montanaro  wrote:
>>> I've emailed the administrator of bbs.geek.nz, maybe he
>>> will be able to stop it.
>>
>> Thanks, Greg. We're actually blocking via that and related headers at
>> the gateway, which is why the mailing list is no longer seeing the
>> duplicates. I'm not sure any of us thought to email the news server
>> admin, though!
>
> I did; the address is fake.
>
> Worked for me. From the URL http://news.bbs.geek.nz/
...
> I just sent a note to that email address. No bounce yet.

"No bounce" is not the same as "worked". You'll get a bounce message
when the mail server at your end gives up some time several days in
the future. Depending on how your mail server is configured, you
may get a "delayed" warning some time before that.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Bill

Chris Angelico wrote:

On Sun, Dec 17, 2017 at 12:01 PM, Bill  wrote:


I think we are talking about the same people.
But in college, the prerequisite of "at least co-enrolled in pre-calc",
turned out to be the right one (based upon quite a lot of teaching
experience).

Fortunately for the programming world, college isn't when everyone
starts. I started coding at six years old. Should I have waited till I
had some pre-calc before getting into programming?


It probably wouldn't have hurt if you had co-enrolled in it.  ;)
And add an English course too to help you to write suitable documentation!
I would think a 6 year old would have priorities above coding--what's 
the hurry?


Bill



ChrisA


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


Re: Python Learning

2017-12-18 Thread Chris Angelico
On Sun, Dec 17, 2017 at 4:42 PM, Bill  wrote:
> Chris Angelico wrote:
>>
>> On Sun, Dec 17, 2017 at 12:01 PM, Bill  wrote:
>>>
>>>
>>> I think we are talking about the same people.
>>> But in college, the prerequisite of "at least co-enrolled in pre-calc",
>>> turned out to be the right one (based upon quite a lot of teaching
>>> experience).
>>
>> Fortunately for the programming world, college isn't when everyone
>> starts. I started coding at six years old. Should I have waited till I
>> had some pre-calc before getting into programming?
>
>
> It probably wouldn't have hurt if you had co-enrolled in it.  ;)
> And add an English course too to help you to write suitable documentation!
> I would think a 6 year old would have priorities above coding--what's the
> hurry?
>

You mean priorities like "making sure my older brother isn't better
than me"? Because that motive - jealousy - was exactly what got me
started :) Sure, it may not be the most noble of goals, but it sure
gave me a good incentive to work hard. (And not just in programming.
That's what made me study hard in other areas, like spelling and
mathematics.)

And that was two decades ago. It's now the 21st century; computers are
ubiquitous. Starting to toy around with coding - maybe with Scratch,
or one of those online algorithm development sites - is an excellent
thing for a single-digit-age person to get into. I don't know of
anyone younger than 4 getting started, but plenty of pre-teens, and
they're doing well at it.

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


Re: Python Templating Language

2017-12-18 Thread Brian Oney via Python-list
you may consider checking out a more general approach. Noweb was the first
to my knowledge and lead the way for Sweave (R or S), and pyweave, as
mentioned.

https://en.wikipedia.org/wiki/Noweb

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


Re: Python Learning

2017-12-18 Thread Marko Rauhamaa
Chris Angelico :

> On Mon, Dec 18, 2017 at 5:59 PM, Marko Rauhamaa  wrote:
>> Let's see. What I have learned on the job is projects and processes
>> (even though college tried to give a taste of those, as well). Then,
>> I have gathered some encyclopedic knowledge about programming
>> languages, libraries, frameworks and operating systems. Finally, I
>> have developed routine.
>>
>> But true eye-openers took place in college: data structures,
>> algorithms, complexity theory, parsing and compiling, recursion,
>> object-oriented programming, logic programming, functional
>> programming, distributed systems, cryptography, logic and formalisms,
>> mathematical rigor etc.
>
> So if you were to choose between two potential hires, one who had 25
> years' experience and the other had nothing but college, which would
> you choose? Are you worth virtually the same salary now as you were
> worth straight out of college?

I am not in management at the moment so I don't do salary negotiations.
I do know people's compensation is *very* loosely correlated with their
value to the organization for various shortsighted and/or exploitative
reasons.

However, I have been doing quite a bit of hiring, quite successfully, I
might add. I am not prejudiced one way or another. Your résumé doesn't
count. Your education doesn't count. What you can do for the team
counts, and that is measured during the interview process.

The team where I work has a gamut of education and experience
backgrounds. Some are college dropouts, some have a PhD. Some are still
in school. I'm the most senior. Frankly, I have *not* detected much
advantage (or disadvantage, for that matter) with a long on-the-job
experience. What has been hugely more important is adaptability and
sheer smarts. The team members have to be able to grasp, evaluate and
express new abstract concepts and be generally on the same wave-length.

Long years in service don't automatically translate into wisdom or
practical solutions. However, I have put to good use what I have learned
along the way.

As for my take-home pay? It peaked during the telecom bubble in the
1990's. Don't worry. I get by fine.


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


Re: Repeated Names (Repeated Names)

2017-12-18 Thread Skip Montanaro
Apologies. I interpreted your use of the word "fake" to imply the
domain didn't really exist. In that case, I would have not expected a
website to be up, nor an email to succeed (even with delays).

S

On Mon, Dec 18, 2017 at 5:12 AM, Jon Ribbens  wrote:
> On 2017-12-17, Skip Montanaro  wrote:
 I've emailed the administrator of bbs.geek.nz, maybe he
 will be able to stop it.
>>>
>>> Thanks, Greg. We're actually blocking via that and related headers at
>>> the gateway, which is why the mailing list is no longer seeing the
>>> duplicates. I'm not sure any of us thought to email the news server
>>> admin, though!
>>
>> I did; the address is fake.
>>
>> Worked for me. From the URL http://news.bbs.geek.nz/
> ...
>> I just sent a note to that email address. No bounce yet.
>
> "No bounce" is not the same as "worked". You'll get a bounce message
> when the mail server at your end gives up some time several days in
> the future. Depending on how your mail server is configured, you
> may get a "delayed" warning some time before that.
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Rhodri James

On 18/12/17 13:28, Marko Rauhamaa wrote:

However, I have been doing quite a bit of hiring, quite successfully, I
might add. I am not prejudiced one way or another. Your résumé doesn't
count. Your education doesn't count. What you can do for the team
counts, and that is measured during the interview process.


While I agree with most of what you say, I disagree with you here.  Your 
CV (résumé) does count, just not necessarily in the way most people expect.


I haven't often been involved in hiring, but the few times I have we had 
more applicants than it was feasible to interview.  We used CVs as the 
only thing we had to filter with, looking for *interesting* people. 
Exactly what "interesting" meant was somewhat arbitrary; we put one 
person through to interview because she was a cellist, and that would 
have given us a complete string quartet (she didn't get the job, sadly).


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Larry Martell
On Mon, Dec 18, 2017 at 9:09 AM, Rhodri James  wrote:
> On 18/12/17 13:28, Marko Rauhamaa wrote:
>>
>> However, I have been doing quite a bit of hiring, quite successfully, I
>> might add. I am not prejudiced one way or another. Your résumé doesn't
>> count. Your education doesn't count. What you can do for the team
>> counts, and that is measured during the interview process.
>
>
> While I agree with most of what you say, I disagree with you here.  Your CV
> (résumé) does count, just not necessarily in the way most people expect.
>
> I haven't often been involved in hiring, but the few times I have we had
> more applicants than it was feasible to interview.  We used CVs as the only
> thing we had to filter with, looking for *interesting* people. Exactly what
> "interesting" meant was somewhat arbitrary; we put one person through to
> interview because she was a cellist, and that would have given us a complete
> string quartet (she didn't get the job, sadly).

Yes, I once chose to interview someone because he had on his resume
that he was an award winning duck decoy carver. He also did not get
the job.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Chris Angelico
On Tue, Dec 19, 2017 at 1:09 AM, Rhodri James  wrote:
> On 18/12/17 13:28, Marko Rauhamaa wrote:
>>
>> However, I have been doing quite a bit of hiring, quite successfully, I
>> might add. I am not prejudiced one way or another. Your résumé doesn't
>> count. Your education doesn't count. What you can do for the team
>> counts, and that is measured during the interview process.
>
>
> While I agree with most of what you say, I disagree with you here.  Your CV
> (résumé) does count, just not necessarily in the way most people expect.
>
> I haven't often been involved in hiring, but the few times I have we had
> more applicants than it was feasible to interview.  We used CVs as the only
> thing we had to filter with, looking for *interesting* people.

This is NORMALLY going to be the case. How many hours does it take to
truly evaluate a candidate? You can't afford to interview a hundred
people only to find that ninety of them are hopelessly unqualified.
Somehow, you have to sift out the most likely candidates, and THEN you
actually meet with them.

But Marko is partly right too. Your CV/résumé isn't going to land you
the job, nor is your education. But they might land you the interview.
With the students I work with, there's a dedicated Careers Services
team that help them to polish their portfolio projects, because a
portfolio is *way* more indicative than a CV or a college degree; but
even then, the best portfolio in the world is only good enough to get
you as far as an interview.

> Exactly what
> "interesting" meant was somewhat arbitrary; we put one person through to
> interview because she was a cellist, and that would have given us a complete
> string quartet (she didn't get the job, sadly).

Heh. Pity. That would be fun.

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


Re: Problem with timeit

2017-12-18 Thread ast


"Steve D'Aprano"  a écrit dans le message de 
news:5a33d0fc$0$2087$b1db1813$d948b...@news.astraweb.com...

On Sat, 16 Dec 2017 12:25 am, ast wrote:



"Thomas Jollans"  a écrit dans le message de
news:mailman.74.1513341235.14074.python-l...@python.org...

On 2017-12-15 11:36, ast wrote:








py> x = 123456**123456
py> s = str(x)
py> len(s)
628578




I discovered that log functions from math module
works with integers, whatever their size, there is
no conversion to float.


import math
x = 123456**123456
math.log10(x)

628577.7303641582   (instantaneous)

so 628578 digits


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


Recommended pypi caching proxy?

2017-12-18 Thread Ray Cote
Hello list:

Looking to deploy a locally cached pypi proxy service.

Is there a recommended/preferred pypi caching tool?
I’ve found:
  - proxypypy
  - Flask-Pypi-Proxy
  - pypicache

All of which seem to have generally the same functionality and all of which
are a few years old.
Recommendations from the crowd?
—Ray


-- 
Raymond Cote, President
Tokenize What Matters®
voice: +1.603.924.6079 email: rgac...@appropriatesolutions.com skype:
ray.cote
Schedule a meeting: https://calendly.com/ray_cote/60min/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Marko Rauhamaa
Rhodri James :
> I haven't often been involved in hiring, but the few times I have we
> had more applicants than it was feasible to interview.

You don't have to interview them all. Once you encounter an excellent
candidate, you can close the deal. If you don't, you might lose them.
You don't have to find the one pearl in a thousand.

> We used CVs as the only thing we had to filter with, looking for
> *interesting* people.

For a developer position, we use a home assignment as a filter. There's
no knowing who completes the assignment, but (1) it gives an idea what
is expected of them and (2) it demonstrates interest from their part.

I only take a look at the CV when I arrive at the interview so I have
talking points with the candidate.

> Exactly what "interesting" meant was somewhat arbitrary; we put one
> person through to interview because she was a cellist, and that would
> have given us a complete string quartet (she didn't get the job,
> sadly).

We want to hire for the job and not bring in extracurricular activities.

However, one great way to stand out is a portfolio of GitHub projects.
Several people have gotten an offer largely based on those (after they
aced the technical interviews). For example, we just hired someone who
had written a game in sed. That doesn't make him an "interesting
person," nor do we look for game or sed developers. But that silly
exercise deeply resonated with our team. We expect to have great synergy
with him.


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


Re: Python Learning

2017-12-18 Thread Larry Martell
On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa  wrote:
> However, one great way to stand out is a portfolio of GitHub projects.
> Several people have gotten an offer largely based on those (after they
> aced the technical interviews). For example, we just hired someone who
> had written a game in sed. That doesn't make him an "interesting
> person," nor do we look for game or sed developers. But that silly
> exercise deeply resonated with our team. We expect to have great synergy
> with him.

I have been excluded from even getting an interview because I did not
have a portfolio of GitHub projects. I think that is a bad filter. I
work 60-70 hours a week for pay, and I have a family and personal
interests.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Chris Angelico
On Tue, Dec 19, 2017 at 3:45 AM, Larry Martell  wrote:
> On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa  wrote:
>> However, one great way to stand out is a portfolio of GitHub projects.
>> Several people have gotten an offer largely based on those (after they
>> aced the technical interviews). For example, we just hired someone who
>> had written a game in sed. That doesn't make him an "interesting
>> person," nor do we look for game or sed developers. But that silly
>> exercise deeply resonated with our team. We expect to have great synergy
>> with him.
>
> I have been excluded from even getting an interview because I did not
> have a portfolio of GitHub projects. I think that is a bad filter. I
> work 60-70 hours a week for pay, and I have a family and personal
> interests.

Maybe not GitHub, but something else. Do you have, anywhere on the
internet, a list of demo-worthy projects? Again drawing from the
students I work with, they're encouraged to build an actual portfolio
web site. Granted, they *are* full stack web developers, so this may
not be applicable to everyone, but still, it's independent of GitHub.

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


Re: Python Learning

2017-12-18 Thread Larry Martell
On Mon, Dec 18, 2017 at 12:05 PM, Chris Angelico  wrote:
> On Tue, Dec 19, 2017 at 3:45 AM, Larry Martell  
> wrote:
>> On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa  wrote:
>>> However, one great way to stand out is a portfolio of GitHub projects.
>>> Several people have gotten an offer largely based on those (after they
>>> aced the technical interviews). For example, we just hired someone who
>>> had written a game in sed. That doesn't make him an "interesting
>>> person," nor do we look for game or sed developers. But that silly
>>> exercise deeply resonated with our team. We expect to have great synergy
>>> with him.
>>
>> I have been excluded from even getting an interview because I did not
>> have a portfolio of GitHub projects. I think that is a bad filter. I
>> work 60-70 hours a week for pay, and I have a family and personal
>> interests.
>
> Maybe not GitHub, but something else. Do you have, anywhere on the
> internet, a list of demo-worthy projects? Again drawing from the
> students I work with, they're encouraged to build an actual portfolio
> web site. Granted, they *are* full stack web developers, so this may
> not be applicable to everyone, but still, it's independent of GitHub.

Nothing I can put on the internet because the work I have done is
either an embedded system or proprietary and used in house for a
company, or part of a commercial project. I do have things I can show
from my machine using my development environment, and I have offered
that up, but for those who want to see something on GitHub it does not
get that far.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Rhodri James

On 18/12/17 16:33, Marko Rauhamaa wrote:

Rhodri James :

I haven't often been involved in hiring, but the few times I have we
had more applicants than it was feasible to interview.


You don't have to interview them all. Once you encounter an excellent
candidate, you can close the deal. If you don't, you might lose them.
You don't have to find the one pearl in a thousand.


We used CVs as the only thing we had to filter with, looking for
*interesting* people.


For a developer position, we use a home assignment as a filter. There's
no knowing who completes the assignment, but (1) it gives an idea what
is expected of them and (2) it demonstrates interest from their part.


I believe we have a standard set of C programming questions we throw at 
interviewees, on the same principle.


One place I worked at used to request a hand-written cover letter with 
applications.  This too was a filter, though not by graphological 
analysis as many people assumed (and took umbrage at).  No, we were 
testing if you could follow instructions and take some degree of care. 
A hastily scribbled piece of paper with lots of crossings out didn't 
auger well for how careful you would be with the code base!



Exactly what "interesting" meant was somewhat arbitrary; we put one
person through to interview because she was a cellist, and that would
have given us a complete string quartet (she didn't get the job,
sadly).


We want to hire for the job and not bring in extracurricular activities.

However, one great way to stand out is a portfolio of GitHub projects.


Er, isn't that an extracurricular activity?  I certainly don't have time 
for it outside work.



Several people have gotten an offer largely based on those (after they
aced the technical interviews). For example, we just hired someone who
had written a game in sed. That doesn't make him an "interesting
person," nor do we look for game or sed developers. But that silly
exercise deeply resonated with our team. We expect to have great synergy
with him.


In other words, you find him interesting because of that.

--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: Recommended pypi caching proxy?

2017-12-18 Thread Matt Wheeler
On Mon, 18 Dec 2017, 15:45 Ray Cote, 
wrote:

> Looking to deploy a locally cached pypi proxy service.
>
> Is there a recommended/preferred pypi caching tool?
> I’ve found:
>   - proxypypy
>   - Flask-Pypi-Proxy
>   - pypicache
>
> All of which seem to have generally the same functionality and all of which
> are a few years old.
> Recommendations from the crowd?
>

In the past I've used https://github.com/devpi/devpi
It may have many features you don't need if all you're after is a caching
proxy, but I found it does that well and it appears to still be pretty
active.

> --

--
Matt Wheeler
http://funkyh.at
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Gene Heskett
On Monday 18 December 2017 09:19:01 Chris Angelico wrote:

> On Tue, Dec 19, 2017 at 1:09 AM, Rhodri James  
wrote:
> > On 18/12/17 13:28, Marko Rauhamaa wrote:
> >> However, I have been doing quite a bit of hiring, quite
> >> successfully, I might add. I am not prejudiced one way or another.
> >> Your résumé doesn't count. Your education doesn't count. What you
> >> can do for the team counts, and that is measured during the
> >> interview process.
> >
> > While I agree with most of what you say, I disagree with you here. 
> > Your CV (résumé) does count, just not necessarily in the way most
> > people expect.
> >
> > I haven't often been involved in hiring, but the few times I have we
> > had more applicants than it was feasible to interview.  We used CVs
> > as the only thing we had to filter with, looking for *interesting*
> > people.
>
> This is NORMALLY going to be the case. How many hours does it take to
> truly evaluate a candidate? You can't afford to interview a hundred
> people only to find that ninety of them are hopelessly unqualified.
> Somehow, you have to sift out the most likely candidates, and THEN you
> actually meet with them.
>
> But Marko is partly right too. Your CV/résumé isn't going to land you
> the job, nor is your education. But they might land you the interview.
> With the students I work with, there's a dedicated Careers Services
> team that help them to polish their portfolio projects, because a
> portfolio is *way* more indicative than a CV or a college degree; but
> even then, the best portfolio in the world is only good enough to get
> you as far as an interview.
>
> > Exactly what
> > "interesting" meant was somewhat arbitrary; we put one person
> > through to interview because she was a cellist, and that would have
> > given us a complete string quartet (she didn't get the job, sadly).
>
> Heh. Pity. That would be fun.
>
> ChrisA

I'll have to agree with most of this about "interesting" people.

But one thing I always  note from the resume or CV is any certifications 
they may carry. I am a C.E.T., and that card laid in front of an HR/GM 
type has gotten me every job I've applied for since 1972, but sadly 
those are rare birds indeed as I've not in the 45 years since, 
encountered another such individual. So I've had to depend on their 
familiarity with a soldering iron and some scope probes to determine if 
they would be useful to me.

That certification is required to get a business license for an 
electronics service business in Kalipornia, weeds out the fly by 
nighters there was a plague of back in the 60's _& 70's.

There really ought to be a similar program for coders. I'd probably fail 
that one, but generally my code works, and does not crash. And I've 
learned a lot while fixing it if it does crash. :)

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


[OT] Python and Excel

2017-12-18 Thread MRAB

Those who use Excel might find this interesting:

Microsoft Considers Adding Python as an Official Scripting Language to Excel
https://www.bleepingcomputer.com/news/microsoft/microsoft-considers-adding-python-as-an-official-scripting-language-to-excel/
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Marko Rauhamaa
Rhodri James :

> On 18/12/17 16:33, Marko Rauhamaa wrote:
>> Rhodri James :
>>> Exactly what "interesting" meant was somewhat arbitrary; we put one
>>> person through to interview because she was a cellist, and that
>>> would have given us a complete string quartet (she didn't get the
>>> job, sadly).
>>
>> We want to hire for the job and not bring in extracurricular
>> activities.
>>
>> However, one great way to stand out is a portfolio of GitHub
>> projects.
>
> Er, isn't that an extracurricular activity? I certainly don't have
> time for it outside work.

GitHub projects are directly applicable to our line of business. Music
is not.


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


Re: Python Learning

2017-12-18 Thread Rob Gaddi

On 12/18/2017 08:45 AM, Larry Martell wrote:

On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa  wrote:

However, one great way to stand out is a portfolio of GitHub projects.
Several people have gotten an offer largely based on those (after they
aced the technical interviews). For example, we just hired someone who
had written a game in sed. That doesn't make him an "interesting
person," nor do we look for game or sed developers. But that silly
exercise deeply resonated with our team. We expect to have great synergy
with him.


I have been excluded from even getting an interview because I did not
have a portfolio of GitHub projects. I think that is a bad filter. I
work 60-70 hours a week for pay, and I have a family and personal
interests.



When I'm hiring I don't necessarily need a candidate to have an 
extensive open-source portfolio, but I need to see some kind of 
portfolio, just as a bar of "This is what I consider my good work to 
be."  The idea that someone is going to have years of experience, but 
not a single page of code that they can let me look over always strikes 
me as odd.


--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list


__contains__ classmethod?

2017-12-18 Thread Tim Chase
Playing around, I had this (happens to be Py2, but gets the same
result in Py3) code

class X(object):
  ONE = "one"
  TWO = "two"
  _ALL = frozenset(v for k,v in locals().items() if k.isupper())
  @classmethod
  def __contains__(cls, v):
return v in cls._ALL
print(dir(X))
print(X._ALL)

Running this gives

  ['ONE', 'TWO', '_ALL', '__class__', '__contains__', '__delattr__',
  '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__',
  '__getattribute__', '__gt__', '__hash__', '__init__', '__le__',
  '__lt__', '__module__', '__ne__', '__new__', '__reduce__',
  '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__',
  '__str__', '__subclasshook__', '__weakref__']

And then, depending on whether it's Py2 or Py3, I get either

  frozenset({'one', 'two'})
  frozenset(['two', 'one'])

Which I expect.  Hey, look. There's a __contains__ method. And it
has been specified as a @classmethod.  So I want to test it:

  print("one" in X)

However that fails with

  Traceback (most recent call last):
File "x.py", line 10, in 
  print("one" in X)
  TypeError: argument of type 'type' is not iterable

My understanding was that "in" makes use of an available __contains__
but something seems to preventing Python from finding that.

What's going on here?

Thanks,

-tkc








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


Re: [OT] Python and Excel

2017-12-18 Thread oliver
That would be amazing. I still have nightmares of when I had to create this
big options analysis VBA program in Excel 2007.

On Mon, Dec 18, 2017, 14:21 MRAB,  wrote:

> Those who use Excel might find this interesting:
>
> Microsoft Considers Adding Python as an Official Scripting Language to
> Excel
>
> https://www.bleepingcomputer.com/news/microsoft/microsoft-considers-adding-python-as-an-official-scripting-language-to-excel/
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
Oliver
My StackOverflow contributions
My CodeProject articles
My Github projects
My SourceForget.net projects
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Christian Gollwitzer

Am 18.12.17 um 05:54 schrieb Bill:

Chris Angelico wrote:

I don't know about vtables as needing to be in ANY programming course.
They're part of a "let's dive into the internals of C++" course. You
certainly don't need them to understand how things work in Python,
because they don't exist; and I'm doubtful that you need to explain
them even to C++ programmers.


Then how are you going to explain dynamic_cast?



You don't need to explain a vtable to explain dynamic_cast. Only if you 
want to become a compiler writer. It is not even required, vtables are 
just the most common implementation.


dynamic_cast simply checks if the actual object that the pointer points 
to is an instance of a derived class, and then casts it into that. You 
could "explain" it with the following pseudo-code


template 
T* dynamic_cast(base *input) {
if (isinstanceof(base, *input)) { return (T*)input; }
else { return nullptr; }
}

How that works (particularly the "isinstanceof") is not the business of 
the programmer - it is sufficient to know that the compiler somewhere 
stores this information for every object.


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


Re: Recommended pypi caching proxy?

2017-12-18 Thread Ray Cote
On Mon, Dec 18, 2017 at 1:00 PM, Matt Wheeler  wrote:

> On Mon, 18 Dec 2017, 15:45 Ray Cote, 
> wrote:
>
>> Looking to deploy a locally cached pypi proxy service.
>>
>> Is there a recommended/preferred pypi caching tool?
>> I’ve found:
>>   - proxypypy
>>   - Flask-Pypi-Proxy
>>   - pypicache
>>
>> All of which seem to have generally the same functionality and all of
>> which
>> are a few years old.
>> Recommendations from the crowd?
>>
>
> In the past I've used https://github.com/devpi/devpi
> It may have many features you don't need if all you're after is a caching
> proxy, but I found it does that well and it appears to still be pretty
> active.
>
>> --
>
> --
> Matt Wheeler
> http://funkyh.at
>

Thanks for the recommendation.
Will take a look at it.
—Ray


-- 
Raymond Cote, President
voice: +1.603.924.6079 email: rgac...@appropriatesolutions.com skype:
ray.cote
Schedule a meeting: https://calendly.com/ray_cote/60min/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: __contains__ classmethod?

2017-12-18 Thread Peter Otten
Tim Chase wrote:

> Playing around, I had this (happens to be Py2, but gets the same
> result in Py3) code
> 
> class X(object):
>   ONE = "one"
>   TWO = "two"
>   _ALL = frozenset(v for k,v in locals().items() if k.isupper())
>   @classmethod
>   def __contains__(cls, v):
> return v in cls._ALL
> print(dir(X))
> print(X._ALL)
> 
> Running this gives
> 
>   ['ONE', 'TWO', '_ALL', '__class__', '__contains__', '__delattr__',
>   '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__',
>   '__getattribute__', '__gt__', '__hash__', '__init__', '__le__',
>   '__lt__', '__module__', '__ne__', '__new__', '__reduce__',
>   '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__',
>   '__str__', '__subclasshook__', '__weakref__']
> 
> And then, depending on whether it's Py2 or Py3, I get either
> 
>   frozenset({'one', 'two'})
>   frozenset(['two', 'one'])
> 
> Which I expect.  Hey, look. There's a __contains__ method. And it
> has been specified as a @classmethod.  So I want to test it:
> 
>   print("one" in X)
> 
> However that fails with
> 
>   Traceback (most recent call last):
> File "x.py", line 10, in 
>   print("one" in X)
>   TypeError: argument of type 'type' is not iterable
> 
> My understanding was that "in" makes use of an available __contains__
> but something seems to preventing Python from finding that.
> 
> What's going on here?

Like __next__ method is looked up in the class, and for the class X that 
would be its metaclass, type. So you have to adjust that:

$ cat contains.py
class XType(type):
def __contains__(cls, v):
print("metaclass")
return v in cls._ALL


class X(metaclass=XType):
ONE = "one"
TWO = "two"
_ALL = frozenset(v for k, v in locals().items() if k.isupper())

@classmethod
def __contains__(cls, v):
print("instance")
return v in cls

print("one" in X, "one" in X())
print("three" in X, "three" in X())
$ python3 contains.py 
metaclass
instance
metaclass
True True
metaclass
instance
metaclass
False False


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


Re: Python Learning

2017-12-18 Thread Gene Heskett
On Monday 18 December 2017 16:05:10 Rob Gaddi wrote:

> On 12/18/2017 08:45 AM, Larry Martell wrote:
> > On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa  
wrote:
> >> However, one great way to stand out is a portfolio of GitHub
> >> projects. Several people have gotten an offer largely based on
> >> those (after they aced the technical interviews). For example, we
> >> just hired someone who had written a game in sed. That doesn't make
> >> him an "interesting person," nor do we look for game or sed
> >> developers. But that silly exercise deeply resonated with our team.
> >> We expect to have great synergy with him.
> >
> > I have been excluded from even getting an interview because I did
> > not have a portfolio of GitHub projects. I think that is a bad
> > filter. I work 60-70 hours a week for pay, and I have a family and
> > personal interests.
>
> When I'm hiring I don't necessarily need a candidate to have an
> extensive open-source portfolio, but I need to see some kind of
> portfolio, just as a bar of "This is what I consider my good work to
> be."  The idea that someone is going to have years of experience, but
> not a single page of code that they can let me look over always
> strikes me as odd.

I've known Larry for years via another list. He has worked on a lot of 
stuff in the financial arena, wrapped in non-disclosure clauses that 
prevent him from even saying what color he dots the i's with, so he gets 
work as much by word of mouth as other more conventional paths.

To not hire him because he doesn't have a big portfolio could be a 
mistake, Rob. Its up to you.
> --
> Rob Gaddi, Highland Technology -- www.highlandtechnology.com
> Email address domain is currently out of order.  See above to fix.


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: __contains__ classmethod?

2017-12-18 Thread Random832
On Mon, Dec 18, 2017, at 16:25, Tim Chase wrote:
> My understanding was that "in" makes use of an available __contains__
> but something seems to preventing Python from finding that.
> 
> What's going on here?

Most __ methods have to be an actual method on the class object, which
means you have to use a metaclass.

"one" in X() works, but to get "one" in X to work, you need:

class M(type):
   def __contains__(cls, v):
 return v in cls._ALL

class X(object, metaclass=M):
   ONE = "one"
   TWO = "two"
   _ALL = frozenset(v for k,v in locals().items() if k.isupper())

If you want *both* "one" in X and "one" in X() to work, I think you
pretty much have to define it in both places.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Larry Martell
On Mon, Dec 18, 2017 at 4:05 PM, Rob Gaddi
 wrote:
> On 12/18/2017 08:45 AM, Larry Martell wrote:
>>
>> On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa  wrote:
>>>
>>> However, one great way to stand out is a portfolio of GitHub projects.
>>> Several people have gotten an offer largely based on those (after they
>>> aced the technical interviews). For example, we just hired someone who
>>> had written a game in sed. That doesn't make him an "interesting
>>> person," nor do we look for game or sed developers. But that silly
>>> exercise deeply resonated with our team. We expect to have great synergy
>>> with him.
>>
>>
>> I have been excluded from even getting an interview because I did not
>> have a portfolio of GitHub projects. I think that is a bad filter. I
>> work 60-70 hours a week for pay, and I have a family and personal
>> interests.
>>
>
> When I'm hiring I don't necessarily need a candidate to have an extensive
> open-source portfolio, but I need to see some kind of portfolio, just as a
> bar of "This is what I consider my good work to be."  The idea that someone
> is going to have years of experience, but not a single page of code that
> they can let me look over always strikes me as odd.

I have lots of code and projects to show, but only on my computer. I
once got a django/python job because I had a PHP app I did to show.
But if they had not interviewed me because I had nothing on a public
site they never would have seen it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-18 Thread Larry Martell
On Mon, Dec 18, 2017 at 4:52 PM, Gene Heskett  wrote:
> On Monday 18 December 2017 16:05:10 Rob Gaddi wrote:
>
>> On 12/18/2017 08:45 AM, Larry Martell wrote:
>> > On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa 
> wrote:
>> >> However, one great way to stand out is a portfolio of GitHub
>> >> projects. Several people have gotten an offer largely based on
>> >> those (after they aced the technical interviews). For example, we
>> >> just hired someone who had written a game in sed. That doesn't make
>> >> him an "interesting person," nor do we look for game or sed
>> >> developers. But that silly exercise deeply resonated with our team.
>> >> We expect to have great synergy with him.
>> >
>> > I have been excluded from even getting an interview because I did
>> > not have a portfolio of GitHub projects. I think that is a bad
>> > filter. I work 60-70 hours a week for pay, and I have a family and
>> > personal interests.
>>
>> When I'm hiring I don't necessarily need a candidate to have an
>> extensive open-source portfolio, but I need to see some kind of
>> portfolio, just as a bar of "This is what I consider my good work to
>> be."  The idea that someone is going to have years of experience, but
>> not a single page of code that they can let me look over always
>> strikes me as odd.
>
> I've known Larry for years via another list. He has worked on a lot of
> stuff in the financial arena, wrapped in non-disclosure clauses that
> prevent him from even saying what color he dots the i's with, so he gets
> work as much by word of mouth as other more conventional paths.

True story.

> To not hire him because he doesn't have a big portfolio could be a
> mistake, Rob. Its up to you.

Thank you my friend.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: __contains__ classmethod?

2017-12-18 Thread Peter Otten
Peter Otten wrote:

> Tim Chase wrote:
> 
>> Playing around, I had this (happens to be Py2, but gets the same
>> result in Py3) code
>> 
>> class X(object):
>>   ONE = "one"
>>   TWO = "two"
>>   _ALL = frozenset(v for k,v in locals().items() if k.isupper())
>>   @classmethod
>>   def __contains__(cls, v):
>> return v in cls._ALL
>> print(dir(X))
>> print(X._ALL)
>> 
>> Running this gives
>> 
>>   ['ONE', 'TWO', '_ALL', '__class__', '__contains__', '__delattr__',
>>   '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__',
>>   '__getattribute__', '__gt__', '__hash__', '__init__', '__le__',
>>   '__lt__', '__module__', '__ne__', '__new__', '__reduce__',
>>   '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__',
>>   '__str__', '__subclasshook__', '__weakref__']
>> 
>> And then, depending on whether it's Py2 or Py3, I get either
>> 
>>   frozenset({'one', 'two'})
>>   frozenset(['two', 'one'])
>> 
>> Which I expect.  Hey, look. There's a __contains__ method. And it
>> has been specified as a @classmethod.  So I want to test it:
>> 
>>   print("one" in X)
>> 
>> However that fails with
>> 
>>   Traceback (most recent call last):
>> File "x.py", line 10, in 
>>   print("one" in X)
>>   TypeError: argument of type 'type' is not iterable
>> 
>> My understanding was that "in" makes use of an available __contains__
>> but something seems to preventing Python from finding that.
>> 
>> What's going on here?
> 
> Like __next__ method is looked up in the class, and for the class X that
> would be its metaclass, type. 

Sorry, I realize that this sentence is impossible to understand. Random832 
states the problem more clearly.

[Digression] I mentioned the __next__() method specifically because I 
remembered that you could override its predecessor next() in the instance. 
However, the examples below demonstrate that this behaviour is limited to 
classic classes:

>>> def demo(C):
... c = C()
... c.next = lambda: 42
... for x in c:
... print x
... break
... 
>>> class A:
... def __iter__(self):
... return self
... def next(self):
... return "class"
... 
>>> demo(A)
42
>>> class B(A, object): pass
... 
>>> demo(B)
class


> So you have to adjust that:
> 
> $ cat contains.py
> class XType(type):
> def __contains__(cls, v):
> print("metaclass")
> return v in cls._ALL
> 
> 
> class X(metaclass=XType):
> ONE = "one"
> TWO = "two"
> _ALL = frozenset(v for k, v in locals().items() if k.isupper())
> 
> @classmethod
> def __contains__(cls, v):
> print("instance")

This should rather be

  print("class")

> return v in cls
> 
> print("one" in X, "one" in X())
> print("three" in X, "three" in X())
> $ python3 contains.py
> metaclass
> instance
> metaclass
> True True
> metaclass
> instance
> metaclass
> False False


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


Re: Python Learning

2017-12-18 Thread Rob Gaddi

On 12/18/2017 01:52 PM, Gene Heskett wrote:

On Monday 18 December 2017 16:05:10 Rob Gaddi wrote:


On 12/18/2017 08:45 AM, Larry Martell wrote:

On Mon, Dec 18, 2017 at 11:33 AM, Marko Rauhamaa 

wrote:

However, one great way to stand out is a portfolio of GitHub
projects. Several people have gotten an offer largely based on
those (after they aced the technical interviews). For example, we
just hired someone who had written a game in sed. That doesn't make
him an "interesting person," nor do we look for game or sed
developers. But that silly exercise deeply resonated with our team.
We expect to have great synergy with him.


I have been excluded from even getting an interview because I did
not have a portfolio of GitHub projects. I think that is a bad
filter. I work 60-70 hours a week for pay, and I have a family and
personal interests.


When I'm hiring I don't necessarily need a candidate to have an
extensive open-source portfolio, but I need to see some kind of
portfolio, just as a bar of "This is what I consider my good work to
be."  The idea that someone is going to have years of experience, but
not a single page of code that they can let me look over always
strikes me as odd.


I've known Larry for years via another list. He has worked on a lot of
stuff in the financial arena, wrapped in non-disclosure clauses that
prevent him from even saying what color he dots the i's with, so he gets
work as much by word of mouth as other more conventional paths.

To not hire him because he doesn't have a big portfolio could be a
mistake, Rob. Its up to you.

--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.



Cheers, Gene Heskett



Not a big portfolio, anything.  Shell scripts that you're using to 
simplify your home login.  The garage door monitor you rigged up from an 
Arduino.  The Python script I wrote to fill a USB stick with a randomly 
chosen selection of MP3s.


I as well don't have a huge portfolio of GitHub projects that I spend my 
life maintaining, but I refuse to believe any of us get away with not 
writing any code outside out professional lives.  Personally, I'd argue 
I can get a better read of a programmer from the 120 line toy they 
tossed off one day to solve an immediate need than I can from the 50 
kLOC proprietary project they share with two other developers and are 
NDAed to the hilt on.


And as for Larry in particular, he's posted a portfolio's worth of code 
to this mailing list just in trying to help folks through their issues. 
For an actual interview I'd want it cleaned up to what he'd consider to 
be acceptable documentation standards for a project, but "demonstrate 
competence" is a well-cleared bar.  I just don't have any work at the 
moment that would justify bringing that big a cannon to bear.


So I stick to my point.  If you have literally nothing that you can show 
me at an interview, I'm dubious.


--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] Python and Excel

2017-12-18 Thread Les Cargill

oliver wrote:

That would be amazing. I still have nightmares of when I had to create this
big options analysis VBA program in Excel 2007.




Odd - I haven't found VBA itself to be all that horrible. Yeah, it's got 
some serious weaknesses but it jut hasn't bit me badly, yet. Then again,

it's not something I do a lot of.



On Mon, Dec 18, 2017, 14:21 MRAB,  wrote:


Those who use Excel might find this interesting:

Microsoft Considers Adding Python as an Official Scripting Language to
Excel

https://www.bleepingcomputer.com/news/microsoft/microsoft-considers-adding-python-as-an-official-scripting-language-to-excel/
--
https://mail.python.org/mailman/listinfo/python-list



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


async serial port in Python.

2017-12-18 Thread Les Cargill


What I'd like to do is set up *some* sort of method in Python to
asynchronously use callbacks to receive characters from a serial port
or 20 serial ports.

If I have to hook an event loop or even spawn a thread - fine! but it
needs to allow for making things event-driven. For lack of a better
term, I'd like this to at least have "select()/epoll() semantics".

And then I'd like to extend that to TCP and UDP ports.

Is this even possible? I keep running into "not done yet"
stuff on this front, but I'm not very up on Python. It may
be ... what's the term ... ? ... un-Pythonic, and I would accept
that as an explanation.


And no, I do not have a pet distro or version of Python. Any is fine
with me.



The Brent Welch book for Tcl has a totally complete example of this
laid out in great detail. That's so 15-20 years ago - try to catch
up, guys :)



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


Re: Python Learning

2017-12-18 Thread Bill

Christian Gollwitzer wrote:


You don't need to explain a vtable to explain dynamic_cast. Only if 
you want to become a compiler writer. It is not even required, vtables 
are just the most common implementation.


dynamic_cast simply checks if the actual object that the pointer 
points to is an instance of a derived class, and then casts it into 
that. You could "explain" it with the following pseudo-code


template 
T* dynamic_cast(base *input) {
if (isinstanceof(base, *input)) { return (T*)input; }
else { return nullptr; }
}

How that works (particularly the "isinstanceof") is not the business 
of the programmer - it is sufficient to know that the compiler 
somewhere stores this information for every object.


Christian


With that, the students would "boo you off the stage!"... and maybe 
accuse you of being a "know it all".  ; )The point of college is 
more about teaching students to think rather than in being efficient.  I 
have little doubt that a tech school could "get through everything" much 
faster.


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


Re: async serial port in Python.

2017-12-18 Thread Les Cargill

Les Cargill wrote:


What I'd like to do is set up *some* sort of method in Python to
asynchronously use callbacks to receive characters from a serial port
or 20 serial ports.

If I have to hook an event loop or even spawn a thread - fine! but it
needs to allow for making things event-driven. For lack of a better
term, I'd like this to at least have "select()/epoll() semantics".

And then I'd like to extend that to TCP and UDP ports.

Is this even possible? I keep running into "not done yet"
stuff on this front, but I'm not very up on Python. It may
be ... what's the term ... ? ... un-Pythonic, and I would accept
that as an explanation.


And no, I do not have a pet distro or version of Python. Any is fine
with me.



The Brent Welch book for Tcl has a totally complete example of this
laid out in great detail. That's so 15-20 years ago - try to catch
up, guys :)




Update: Found this:

http://pyserial-asyncio.readthedocs.io/en/latest/index.html

Seems to work. It's still "experimental"?

--
Les Cargill



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


Re: __contains__ classmethod?

2017-12-18 Thread MRAB

On 2017-12-18 21:25, Tim Chase wrote:

Playing around, I had this (happens to be Py2, but gets the same
result in Py3) code

class X(object):
   ONE = "one"
   TWO = "two"
   _ALL = frozenset(v for k,v in locals().items() if k.isupper())
   @classmethod
   def __contains__(cls, v):
 return v in cls._ALL
print(dir(X))
print(X._ALL)

Running this gives

   ['ONE', 'TWO', '_ALL', '__class__', '__contains__', '__delattr__',
   '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__',
   '__getattribute__', '__gt__', '__hash__', '__init__', '__le__',
   '__lt__', '__module__', '__ne__', '__new__', '__reduce__',
   '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__',
   '__str__', '__subclasshook__', '__weakref__']

And then, depending on whether it's Py2 or Py3, I get either

   frozenset({'one', 'two'})
   frozenset(['two', 'one'])

Which I expect.  Hey, look. There's a __contains__ method. And it
has been specified as a @classmethod.  So I want to test it:

   print("one" in X)

However that fails with

   Traceback (most recent call last):
 File "x.py", line 10, in 
   print("one" in X)
   TypeError: argument of type 'type' is not iterable

My understanding was that "in" makes use of an available __contains__
but something seems to preventing Python from finding that.

What's going on here?

Maybe it's just because it's intended to be an instance method, like 
__getitem__.

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


Re: async serial port in Python.

2017-12-18 Thread John Pote



On 18/12/2017 23:20, Les Cargill wrote:


What I'd like to do is set up *some* sort of method in Python to
asynchronously use callbacks to receive characters from a serial port
or 20 serial ports.

If I have to hook an event loop or even spawn a thread - fine! but it
needs to allow for making things event-driven. For lack of a better
term, I'd like this to at least have "select()/epoll() semantics".

And then I'd like to extend that to TCP and UDP ports.

Is this even possible? I keep running into "not done yet"
stuff on this front, but I'm not very up on Python. It may
be ... what's the term ... ? ... un-Pythonic, and I would accept
that as an explanation.


And no, I do not have a pet distro or version of Python. Any is fine
with me.
I've use Chris Liechti's pySerial very successfully several times on 
Python 2.7 and earlier and just a test with 3.6. Easy enough to access 
it from Python threads. I'm stuck with Windoze so have used COMx: port 
access to both PC native serial port (I have old kit) and USB virtual 
serial ports. No idea about xNix.




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


correctness proof for alpha-beta algorithm

2017-12-18 Thread namenobodywants
hi all

can anybody tell me where to look for a proof of the correctness of a 
minimax/negamax algorithm with alpha-beta pruning? thanks if you can help

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


Re: correctness proof for alpha-beta algorithm

2017-12-18 Thread Terry Reedy

On 12/19/2017 1:01 AM, namenobodywa...@gmail.com wrote:


can anybody tell me where to look for a proof of the correctness of a 
minimax/negamax algorithm with alpha-beta pruning? thanks if you can help


Where or how have you looked so far?  How formal do you want?

--
Terry Jan Reedy

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