Re: connect four (game)

2017-11-25 Thread Terry Reedy
On 11/24/2017 9:05 PM, namenobodywa...@gmail.com wrote: On Friday, November 24, 2017 at 12:13:18 PM UTC-8, Terry Reedy wrote: Since you did not start with tests or write tests as you wrote code, ... that I could tell ... I agree that I should have stuck in a qualifier, such as 'apparently'.

Pros and cons of Python sources?

2017-11-25 Thread Martin Schöön
Some time ago I was advised that having a Python installation based on several sources (pip and Debian's repos in my case) is not a good idea. I need to tidy up my installation and I don't know what to opt for and what to opt out. What are the pros and cons of the alternatives including the ones I

Re: Pros and cons of Python sources?

2017-11-25 Thread alister via Python-list
On Sat, 25 Nov 2017 09:20:44 +, Martin Schöön wrote: > Some time ago I was advised that having a Python installation based on > several sources (pip and Debian's repos in my case) is not a good idea. > I need to tidy up my installation and I don't know what to opt for and > what to opt out. >

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-25 Thread Rustom Mody
On Friday, November 24, 2017 at 12:20:29 AM UTC+5:30, Mikhail V wrote: > Ok, I personally could find some practical usage for that, but > merely for fun. I doubt though that someone with less > typographical experience and overall computer literacy could > really make benefits even for personal usa

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-25 Thread Rustom Mody
On Saturday, November 25, 2017 at 6:03:52 PM UTC+5:30, Rustom Mody wrote: > On Friday, November 24, 2017 at 12:20:29 AM UTC+5:30, Mikhail V wrote: > > Ok, I personally could find some practical usage for that, but > > merely for fun. I doubt though that someone with less > > typographical experienc

Re: connect four (game)

2017-11-25 Thread bartc
On 25/11/2017 04:43, Ian Kelly wrote: On Fri, Nov 24, 2017 at 7:05 PM, wrote: On Friday, November 24, 2017 at 12:13:18 PM UTC-8, Terry Reedy wrote: Since you did not start with tests or write tests as you wrote code, ... why on earth would you assume that? instantiate "window" and you'll s

How to shut down a TCPServer serve_forever() loop?

2017-11-25 Thread John Pote
Hi all, My problem in summary is that my use of the shutdown() method only shuts down a server after the next TCP request is received. I have a TCP server created in the run() method of a thread.     class TCPlistener( Thread ):         def run( self ):       with socketserver.TCPServer(

Re: Benefits of unicode identifiers (was: Allow additional separator in identifiers)

2017-11-25 Thread Chris Angelico
On Sat, Nov 25, 2017 at 11:33 PM, Rustom Mody wrote: > Personally I feel that there should be a law against languages that disallow > the creation of magic tricks!¡! I agree. The programming language should also ensure that your program will terminate eventually, that it is bug-free (this can act

Re: Pros and cons of Python sources?

2017-11-25 Thread Michael Torrie
On 11/25/2017 02:20 AM, Martin Schöön wrote: > Some time ago I was advised that having a Python installation > based on several sources (pip and Debian's repos in my case) > is not a good idea. I need to tidy up my installation and I > don't know what to opt for and what to opt out. > > What are t

Re: Pros and cons of Python sources?

2017-11-25 Thread Rustom Mody
On Saturday, November 25, 2017 at 9:45:07 PM UTC+5:30, Michael Torrie wrote: > On 11/25/2017 02:20 AM, Martin Schöön wrote: > > Some time ago I was advised that having a Python installation > > based on several sources (pip and Debian's repos in my case) > > is not a good idea. I need to tidy up my

Re: connect four (game)

2017-11-25 Thread Ian Kelly
On Sat, Nov 25, 2017 at 6:00 AM, bartc wrote: > Where are your unittests for these unittests? Taking this question more seriously than it deserves: the tests for the unittest module itself are at https://hg.python.org/cpython/file/tip/Lib/unittest/test. Yes, unittest has tests of itself. As for

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-25 Thread Rustom Mody
On Friday, November 24, 2017 at 10:52:47 PM UTC+5:30, Rick Johnson wrote: > Furthermore, if we are to march headlong onto the glorious > battlefields of diversity and equality… Obligatory viewing for those who underappreciate diversity, equality and such https://youtu.be/Zh3Yz3PiXZw [My old coll

Re: connect four (game)

2017-11-25 Thread Chris Angelico
On Sun, Nov 26, 2017 at 3:36 AM, Ian Kelly wrote: > On Sat, Nov 25, 2017 at 6:00 AM, bartc wrote: >> Where are your unittests for these unittests? > > No, the point of having unit tests is to build confidence that the > code in question works correctly. It's *possible* that the code is > broken,

Re: connect four (game)

2017-11-25 Thread Ian Kelly
On Sat, Nov 25, 2017 at 10:02 AM, Chris Angelico wrote: > On Sun, Nov 26, 2017 at 3:36 AM, Ian Kelly wrote: >> On Sat, Nov 25, 2017 at 6:00 AM, bartc wrote: >>> Where are your unittests for these unittests? >> >> No, the point of having unit tests is to build confidence that the >> code in quest

Re: connect four (game)

2017-11-25 Thread Christopher Reimer
On Nov 25, 2017, at 9:16 AM, Ian Kelly wrote: > >> On Sat, Nov 25, 2017 at 10:02 AM, Chris Angelico wrote: >>> On Sun, Nov 26, 2017 at 3:36 AM, Ian Kelly wrote: On Sat, Nov 25, 2017 at 6:00 AM, bartc wrote: Where are your unittests for these unittests? >>> >>> No, the point of havin

Re: connect four (game)

2017-11-25 Thread Michael Torrie
On 11/25/2017 06:00 AM, bartc wrote: > And there's a quite lot left of the rest of the program to worry about too! > > If you add 'window()' at the end of the program, then it seems to run on > Python 3. I'd play around with it first before thinking up strategies > for testing it. Actually, no.

Re: connect four (game)

2017-11-25 Thread namenobodywants
On Saturday, November 25, 2017 at 5:00:12 AM UTC-8, bartc wrote: > Actually I've no idea what these tests are supposed to prove. me neither; i think you guys may be getting me out of my depth now > They are to do with one class called 'infinity', which is never used in the > rest > of the pr

Re: connect four (game)

2017-11-25 Thread namenobodywants
On Friday, November 24, 2017 at 8:07:07 AM UTC-8, Chris Angelico wrote: > This is the kind of function that needs a docstring and some comments. > What exactly is this doing? What are the "lines" of the board? What's > the difference between "linear" and "lines"? What exactly is it > returning? p

Compile Python 3 interpreter to force 2-byte unicode

2017-11-25 Thread wojtek . mula
Hi, my goal is to obtain an interpreter that internally uses UCS-2. Such a simple code should print 65535: import sys print sys.maxunicode This is enabled in Windows, but I want the same in Linux. What options have I pass to the configure script? w. -- https://mail.python.org/mailman/listin

Re: Compile Python 3 interpreter to force 2-byte unicode

2017-11-25 Thread Chris Angelico
On Sun, Nov 26, 2017 at 9:05 AM, wrote: > Hi, my goal is to obtain an interpreter that internally > uses UCS-2. Such a simple code should print 65535: > > import sys > print sys.maxunicode > > This is enabled in Windows, but I want the same in Linux. > What options have I pass to the configur

Re: connect four (game)

2017-11-25 Thread namenobodywants
On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: > I did, and it looks buggy to me. The top and left frame lines are > missing. If I click a square, the bottom square in the column lights > up. But then I have no idea whether those are your intentions or not. i hadn't

Re: connect four (game)

2017-11-25 Thread Terry Reedy
On 11/25/2017 4:57 PM, namenobodywa...@gmail.com wrote: On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: I did, and it looks buggy to me. The top and left frame lines are missing. If I click a square, the bottom square in the column lights up. But then I have no idea w

Re: Compile Python 3 interpreter to force 2-byte unicode

2017-11-25 Thread Terry Reedy
On 11/25/2017 5:12 PM, Chris Angelico wrote: On Sun, Nov 26, 2017 at 9:05 AM, wrote: Hi, my goal is to obtain an interpreter that internally uses UCS-2. Such a simple code should print 65535: import sys print sys.maxunicode This is enabled in Windows, but I want the same in Linux. What

Re: Compile Python 3 interpreter to force 2-byte unicode

2017-11-25 Thread Chris Angelico
On Sun, Nov 26, 2017 at 10:59 AM, Terry Reedy wrote: > On 11/25/2017 5:12 PM, Chris Angelico wrote: >> >> On Sun, Nov 26, 2017 at 9:05 AM, wrote: >>> >>> Hi, my goal is to obtain an interpreter that internally >>> uses UCS-2. Such a simple code should print 65535: >>> >>>import sys >>>pr

Re: Compile Python 3 interpreter to force 2-byte unicode

2017-11-25 Thread Ned Batchelder
On 11/25/17 5:05 PM, wojtek.m...@gmail.com wrote: Hi, my goal is to obtain an interpreter that internally uses UCS-2. Such a simple code should print 65535: import sys print sys.maxunicode This is enabled in Windows, but I want the same in Linux. What options have I pass to the configure

Re: Pros and cons of Python sources?

2017-11-25 Thread Cameron Simpson
On 25Nov2017 08:34, rusi wrote: On Saturday, November 25, 2017 at 9:45:07 PM UTC+5:30, Michael Torrie wrote: The problem with mixing repository-installed packages with pip-installed packages is that there's always a chance a Debian update will overwrite a pip package, possibly with an older ver

Re: Compile Python 3 interpreter to force 2-byte unicode

2017-11-25 Thread Rustom Mody
On Sunday, November 26, 2017 at 3:43:29 AM UTC+5:30, Chris Angelico wrote: > On Sun, Nov 26, 2017 at 9:05 AM, wojtek.mula wrote: > > Hi, my goal is to obtain an interpreter that internally > > uses UCS-2. Such a simple code should print 65535: > > > > import sys > > print sys.maxunicode > > >

Re: Compile Python 3 interpreter to force 2-byte unicode

2017-11-25 Thread Chris Angelico
On Sun, Nov 26, 2017 at 3:53 PM, Rustom Mody wrote: > On Sunday, November 26, 2017 at 3:43:29 AM UTC+5:30, Chris Angelico wrote: >> On Sun, Nov 26, 2017 at 9:05 AM, wojtek.mula wrote: >> > Hi, my goal is to obtain an interpreter that internally >> > uses UCS-2. Such a simple code should print 655

Re: Compile Python 3 interpreter to force 2-byte unicode

2017-11-25 Thread Serhiy Storchaka
26.11.17 01:59, Terry Reedy пише: On 11/25/2017 5:12 PM, Chris Angelico wrote: On Sun, Nov 26, 2017 at 9:05 AM,  wrote: Hi, my goal is to obtain an interpreter that internally uses UCS-2. Such a simple code should print 65535:    import sys    print sys.maxunicode This is enabled in Windows,