[issue10544] yield expression inside generator expression does nothing

2017-11-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4506 ___ Python tracker ___ ___

Re: I have anaconda, but Pycharm can't find it

2017-11-26 Thread Miki Tebeka
You need to set the Python interpreter for the project to be the Anaconda one. See https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html On Monday, November 27, 2017 at 1:56:58 AM UTC+2, C W wrote: > Hello all, > > I am a first time PyCharm user. I have Python 3 and

Re: connect four (game)

2017-11-26 Thread Chris Angelico
On Mon, Nov 27, 2017 at 3:04 PM, Rustom Mody wrote: >> Aviators have pinned down the best solution to this, I think. A pilot >> is not expected to be perfect; he is expected to follow checklists. A >> preflight checklist. A departure checklist. A landing checklist. >>

[issue32107] test_uuid uses the incorrect bitmask

2017-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Currently PR 4576 combines a bug fix and a new feature. 1. Removes wrong check and adds a verbose clarifying comment. This part should be backported to maintained versions. 2. Adds multiple explicit "return None". This is a

[issue32144] email.policy.SMTP and SMTPUTF8 doesn't honor linesep's value

2017-11-26 Thread Mark Sapiro
Change by Mark Sapiro : -- nosy: +msapiro ___ Python tracker ___ ___ Python-bugs-list

[issue10544] yield expression inside generator expression does nothing

2017-11-26 Thread Guido van Rossum
Guido van Rossum added the comment: Great. It should be a DeprecationWarning, since we're planning to disallow it completely, right? IIRC SyntaxWarning is for syntax that we can't deprecate. -- ___ Python tracker

[issue32142] heapq.heappop - documentation misleading or doesn't work

2017-11-26 Thread Scott Queen
Scott Queen added the comment: Fair statement. "Properly sorted" was a poor choice. Seems that "if the invariant is true as a precondition, it will be true as a postcondition" is accurate and descriptive - maybe with a caution that modifying the list (heap) values by means

Re: connect four (game)

2017-11-26 Thread Rustom Mody
On Monday, November 27, 2017 at 9:08:42 AM UTC+5:30, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 1:55 PM, Michael Torrie wrote: > > On 11/26/2017 07:11 AM, bartc wrote: > >>> You may argue that testing doesn't matter for his small game, written > >>> for his own education and amusement. The

[issue10544] yield expression inside generator expression does nothing

2017-11-26 Thread Nick Coghlan
Nick Coghlan added the comment: Cool, if you're OK with that behaviour, it actually makes this a lot easier, since it means: 1. Serhiy's patch is already sufficient for the final hard compatibility break 2. It can be readily adapted to emit either DeprecationWarning or

Re: connect four (game)

2017-11-26 Thread Chris Angelico
On Mon, Nov 27, 2017 at 1:55 PM, Michael Torrie wrote: > On 11/26/2017 07:11 AM, bartc wrote: >>> You may argue that testing doesn't matter for his small game, written >>> for his own education and amusement. The fact is that software in >>> general is of abysmal quality

Re: connect four (game)

2017-11-26 Thread Michael Torrie
On 11/25/2017 12:58 PM, namenobodywa...@gmail.com wrote: > the idea is that there should be exactly one object posinf (positive > infinity) that compares as strictly greater than any number ever considered, > and exactly one object neginf that compares as strictly less; as the code > stands now

Re: connect four (game)

2017-11-26 Thread Michael Torrie
On 11/26/2017 08:39 AM, bartc wrote: > The problem was traced to two lines that were in the wrong order (in the > original program). I can't see how unit tests can have helped in any way > at all, and it would probably have taken much longer. What makes you think that? Surely other decoders

Re: connect four (game)

2017-11-26 Thread Michael Torrie
On 11/26/2017 07:11 AM, bartc wrote: >> You may argue that testing doesn't matter for his small game, written >> for his own education and amusement. The fact is that software in >> general is of abysmal quality across the boards, and promoting a habit >> of unit testing is good, even for

Re: [META] Why are duplicate posts coming through?

2017-11-26 Thread Rustom Mody
On Monday, November 27, 2017 at 5:35:09 AM UTC+5:30, Skip Montanaro wrote: > Chris, > > Please forward one or two to me. Mark Sapiro and I have been banging on the > SpamBayes instance which supports the Usenet gateway. I suppose it's > possible some change caused the problem you're seeing. > >

[issue32051] Possible issue in multiprocessing doc

2017-11-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32051] Possible issue in multiprocessing doc

2017-11-26 Thread Berker Peksag
Berker Peksag added the comment: New changeset 8a957534f5182022ee8ac2dbaac4b4900dc98159 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-32051: Fix name shadowing in multiprocessing docs (GH-4469)

Re: nospam ** infinity?

2017-11-26 Thread Chris Angelico
On Mon, Nov 27, 2017 at 12:14 PM, Skip Montanaro wrote: >> There seems to be a gateway loop of some sort going on. >> I'm seeing multiple versions of the same posts in >> comp.lang.python with different numbers of "nospam"s >> prepended to the email address. > > This is

[issue32051] Possible issue in multiprocessing doc

2017-11-26 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4505 ___ Python tracker ___

[issue32051] Possible issue in multiprocessing doc

2017-11-26 Thread Berker Peksag
Berker Peksag added the comment: New changeset c172fc5031a4035986bef0b2fcef906706d7abf3 by Berker Peksag (Jason Yang) in branch 'master': bpo-32051: Fix name shadowing in multiprocessing docs (GH-4469)

Re: nospam ** infinity?

2017-11-26 Thread Skip Montanaro
> There seems to be a gateway loop of some sort going on. > I'm seeing multiple versions of the same posts in > comp.lang.python with different numbers of "nospam"s > prepended to the email address. This is the second thread about this. I was thinking it might be related to recent changes to the

Re: [META] Why are duplicate posts coming through?

2017-11-26 Thread Chris Angelico
On Mon, Nov 27, 2017 at 11:04 AM, Skip Montanaro wrote: > Chris, > > Please forward one or two to me. Mark Sapiro and I have been banging on the > SpamBayes instance which supports the Usenet gateway. I suppose it's > possible some change caused the problem you're

Re: Pros and cons of Python sources?

2017-11-26 Thread Cameron Simpson
On 26Nov2017 10:00, nospam.Martin Schöön wrote: Den 2017-11-26 skrev 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

[issue32144] email.policy.SMTP and SMTPUTF8 doesn't honor linesep's value

2017-11-26 Thread Abhilash Raj
New submission from Abhilash Raj : According to the documentation, email.policy.SMTP and .SMTPUTF8 should have CRLF (`\r\n`) as line endings for text/plain parts. However, a new message parsed using message_from_binary_file with policy.SMTPUTF8 has `\n` as line

Re: [META] Why are duplicate posts coming through?

2017-11-26 Thread Skip Montanaro
Chris, Please forward one or two to me. Mark Sapiro and I have been banging on the SpamBayes instance which supports the Usenet gateway. I suppose it's possible some change caused the problem you're seeing. Skip On Nov 26, 2017 5:22 PM, "Chris Angelico" wrote: Not sure

nospam ** infinity?

2017-11-26 Thread Gregory Ewing
There seems to be a gateway loop of some sort going on. I'm seeing multiple versions of the same posts in comp.lang.python with different numbers of "nospam"s prepended to the email address. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

I have anaconda, but Pycharm can't find it

2017-11-26 Thread C W
Hello all, I am a first time PyCharm user. I have Python 3 and Anaconda installed. They work together on Sublime Text, but not on Pycharm. Pycharm tells me it cannot find modules numpy, matplotlib, etc. What should I do? I tried to set the interpreter environment, and a few other options, none

Merits of otherwise of test-first (Re: connect four (game))

2017-11-26 Thread Gregory Ewing
bartc wrote: Testing everything comprehensively just wouldn't be useful for me who works on whole applications, whole concepts, not just a handful of functions with well-defined inputs and outputs. I had this experience with Pyrex (the precursor to Cython). The various parts are so

[issue32107] test_uuid uses the incorrect bitmask

2017-11-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: PR #4576 includes all related changes. -- ___ Python tracker ___

[issue32107] test_uuid uses the incorrect bitmask

2017-11-26 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- pull_requests: +4504 ___ Python tracker ___ ___

[META] Why are duplicate posts coming through?

2017-11-26 Thread Chris Angelico
Not sure whether this is an issue for -owner or not; apologies if not. I'm seeing a whole lot of reasonably-recent posts getting re-sent, with "nospam" attached to the posters' names. And they're getting re-sent multiple times. Sometimes the posts have encoding problems (small amounts of

Re: connect four (game)

2017-11-26 Thread Chris Angelico
On Mon, Nov 27, 2017 at 10:08 AM, Gregory Ewing wrote: > Chris Angelico wrote: > >> On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: > >> >>> >>> If I had to bother with such systematic tests as you suggest, and finish >>> and >>> sign off everything

Re: connect four (game)

2017-11-26 Thread Gregory Ewing
Chris Angelico wrote: On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: > If I had to bother with such systematic tests as you suggest, and finish and sign off everything before proceeding further, then nothing would ever get done. (Maybe it's viable if working from an exacting

Re: connect four (game)

2017-11-26 Thread Gregory Ewing
bartc wrote: (Maybe it's viable if working from an exacting specification that someone else has already worked out.) In my experience, for anything non-trivial that hasn't been done before, these "exacting specifications" never exist. Even if someone handles wnat they *think* are exact and

[issue31650] implement PEP 552

2017-11-26 Thread Benjamin Peterson
Change by Benjamin Peterson : -- keywords: +patch pull_requests: +4503 stage: needs patch -> patch review ___ Python tracker ___

Re: Stopping an iterator and continuing later

2017-11-26 Thread Gregory Ewing
november nihal wrote: I should have added I switch off the machine when I stop. ( I dont have options to keep it in a sleep mode or in hibernation ) The iterator returned by itertools.combinations is pickleable: >>> from pickle import dumps, loads >>> from itertools import combinations >>> c

[issue32140] IDLE debugger fails with non-trivial __new__ super call

2017-11-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is not a crash because IDLE does not crash. It does not even exit with a traceback. Some crash and freeze bugs have been fixed since 3.4.2. I verified with 3.7.0a2 on Win10. The failing example can be simplified to the first two

[issue23033] Disallow support for a*.example.net, *a.example.net, and a*b.example.net in certificate wildcard handling.

2017-11-26 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: I merged the PR, this is now in 3.7. Thanks all! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue23033] Disallow support for a*.example.net, *a.example.net, and a*b.example.net in certificate wildcard handling.

2017-11-26 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset ede2ac913eba47131ee1bbc37a9aea344d678576 by Mariatta (Mandeep Singh) in branch 'master': bpo-23033: Improve SSL Certificate handling (GH-937)

[issue29879] typing.Text not available in python 3.5.1

2017-11-26 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: This has been fixed in the 3.7 and 3.6 branches. Thanks all! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 ___ Python

[issue29879] typing.Text not available in python 3.5.1

2017-11-26 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset cceb0f8d7b3451fb8de03651c979f5ac639b68c0 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-29879: Update typing documentation. (GH-4573) (GH-4574)

[issue29879] typing.Text not available in python 3.5.1

2017-11-26 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4502 ___ Python tracker ___

[issue29879] typing.Text not available in python 3.5.1

2017-11-26 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 0cd2e81bea639828d7c9a7afc61fb1da9699492c by Mariatta (Ivan Levkivskyi) in branch 'master': bpo-29879: Update typing documentation. (GH-4573)

[issue32143] os.statvfs lacks f_fsid

2017-11-26 Thread Martin Panter
Martin Panter added the comment: The doc string for the result object, and the main Python 2 documentation, both say that the result is a 10-tuple. So perhaps any new field should only be an attribute, and the tuple should stay the same size, to maintain compatibility.

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-26 Thread STINNER Victor
STINNER Victor added the comment: Cool, thanks Zach! -- ___ Python tracker ___

[issue32107] test_uuid uses the incorrect bitmask

2017-11-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4500 ___ Python tracker ___ ___

[issue32107] test_uuid uses the incorrect bitmask

2017-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 4572 removes the wrong check. -- type: -> behavior versions: +Python 2.7, Python 3.6 ___ Python tracker

[issue29879] typing.Text not available in python 3.5.1

2017-11-26 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- keywords: +patch pull_requests: +4501 stage: -> patch review ___ Python tracker ___

[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-26 Thread Zachary Ware
Change by Zachary Ware : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28046] Remove the concept of platform-specific directories

2017-11-26 Thread Zachary Ware
Change by Zachary Ware : -- resolution: -> fixed stage: commit review -> resolved status: pending -> closed ___ Python tracker

[issue32142] heapq.heappop - documentation misleading or doesn't work

2017-11-26 Thread Eric V. Smith
Eric V. Smith added the comment: By "sorted" I meant "sorted by the heap functions so as to maintain their invariants". I don't have any suggestion for the actual specific language to use. -- ___ Python tracker

[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-26 Thread Zachary Ware
Zachary Ware added the comment: New changeset d8d6b9122134f040cd5a4f15f40f6c9e3386db4d by Zachary Ware (Caleb Hattingh) in branch 'master': bpo-30487: automatically create a venv and install Sphinx when running make (GH-4346)

[issue32107] test_uuid uses the incorrect bitmask

2017-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a different issue. -- ___ Python tracker ___

Re: connect four (game)

2017-11-26 Thread nospam . nospam . bartc
On 26/11/2017 14:23, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: >> The way I write code isn't incrementally top down or bottom up. It's >> backwards and forwards. Feedback from different parts means the thing >> develops as a whole. Sometimes parts are

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . nospam . bartc
On 26/11/2017 09:09, Greg Tibbet wrote: > > I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit > of Java and trying to learn this new-fangled Python language! > > I've got a small program that uses PIL to create an image, draw some > primitives (rectanges, ellipses, etc...) and

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . nospam . Wanderer
On Sunday, November 26, 2017 at 4:10:12 AM UTC-5, Greg Tibbet wrote: > I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit > of Java and trying to learn this new-fangled Python language! > > I've got a small program that uses PIL to create an image, draw some > primitives

Re: connect four (game)

2017-11-26 Thread nospam . nospam . bartc
On 25/11/2017 23:49, Terry Reedy wrote: > 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

Re: connect four (game)

2017-11-26 Thread nospam . nospam . bartc
On 25/11/2017 16:07, Michael Torrie wrote: > 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

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

2017-11-26 Thread nospam . nospam . 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: Stopping an iterator and continuing later (Posting On Python-List P

2017-11-26 Thread november nihal
On Saturday, 25 November 2017 20:59:02 UTC, Lawrence Dâ ÖOliveiro wrote: > On Sunday, November 26, 2017 at 6:43:05 AM UTC+13, novembe...@gmail.com wrote: > > I worked out how to use iterators to generate values one at a time > > then ran into a second problem which is time. Is it possible to > >

Re: Stopping an iterator and continuing later

2017-11-26 Thread Stefan Ram
r...@zedat.fu-berlin.de (Stefan Ram) writes: >Then you can use pickle or custom methods to save and >restore the object, or get the state from an iterator >and create a new iterator with that state later. One does not always have to write a custom class, for example: main.py import pickle

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

2017-11-26 Thread nospam . nospam . 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

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

2017-11-26 Thread nospam . nospam . 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

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

2017-11-26 Thread nospam . nospam . 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

Re: connect four (game)

2017-11-26 Thread nospam.nospam.alister via Python-list
On Sat, 25 Nov 2017 12:26:52 -0800, namenobodywants wrote: > 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

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . nospam . Cameron Simpson
On 26Nov2017 01:09, Greg Tibbet wrote: >I've got a small program that uses PIL to create an image, draw some >primitives (rectanges, ellipses, etc...) and save it. Works fine... >no issues. > >I've found in the past, the best way to "really learn" the language >was to "dig

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . nospam . Peter Otten
Greg Tibbet wrote: > > I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit > of Java and trying to learn this new-fangled Python language! > > I've got a small program that uses PIL to create an image, draw some > primitives (rectanges, ellipses, etc...) and save it. Works

C-api: Executing several scripts as __main__: globals are gone

2017-11-26 Thread nospam . nospam . Hartmut Goebel
Hello, in PyInstaller we execute several Python scripts one after each other. The primary use of this is to run some setup prior to the actual appication. Up to now all scripts shared the same global variables, which worked well for 15 years, but now showed an error. The new code (scratched

Re: Pros and cons of Python sources?

2017-11-26 Thread nospam . nospam . Martin Schöön
(Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?=) Den 2017-11-26 skrev 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

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . nospam . Gisle Vanem
Greg Tibbet wrote: > ellipse() uses the method self.draw.draw_ellipse() Okay, fine... > but WHERE is draw_ellipse defined?? What magic is happening there? > I've searched the entire PIL directory tree, and the ONLY two places > draw_ellipse is mentioned are right there in the ellipse()

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

2017-11-26 Thread wxjmfauth
Le dimanche 26 novembre 2017 05:53:55 UTC+1, Rustom Mody a ÄCcritâ : > 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

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread Stefan Ram
Greg Tibbet writes: >I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit >of Java and trying to learn this new-fangled Python language! Which actually is older than Java. >def ellipse(self, xy, fill=None, outline=None): >"""Draw an ellipse.""" >

Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . nospam . Greg Tibbet
I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit of Java and trying to learn this new-fangled Python language! I've got a small program that uses PIL to create an image, draw some primitives (rectanges, ellipses, etc...) and save it. Works fine... no issues. I've found in

Re: connect four (game)

2017-11-26 Thread nospam . nospam . 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

Re: connect four (game)

2017-11-26 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: Compile Python 3 interpreter to force 2-byte unicode

2017-11-26 Thread nospam . nospam . 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

Re: connect four (game)

2017-11-26 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?

[issue32107] test_uuid uses the incorrect bitmask

2017-11-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 26, 2017, at 14:07, Serhiy Storchaka wrote: > > Universally/locally administered MAC addresses doesn't have relation to this > issue. My assumption was about the multicast bit (1<<40). AFAICT, the multicast

Compile Python 3 interpreter to force 2-byte unicode

2017-11-26 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. --

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . bartc
On 26/11/2017 09:09, Greg Tibbet wrote: > > I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit > of Java and trying to learn this new-fangled Python language! > > I've got a small program that uses PIL to create an image, draw some > primitives (rectanges, ellipses, etc...) and

Re: connect four (game)

2017-11-26 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

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . Peter Otten
Greg Tibbet wrote: > > I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit > of Java and trying to learn this new-fangled Python language! > > I've got a small program that uses PIL to create an image, draw some > primitives (rectanges, ellipses, etc...) and save it. Works

Re: connect four (game)

2017-11-26 Thread nospam . nospam . 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: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . Cameron Simpson
On 26Nov2017 01:09, Greg Tibbet wrote: >I've got a small program that uses PIL to create an image, draw some >primitives (rectanges, ellipses, etc...) and save it. Works fine... >no issues. > >I've found in the past, the best way to "really learn" the language >was to "dig

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

2017-11-26 Thread wojtek . mula
On Sunday, November 26, 2017 at 1:00:19 AM UTC+1, Terry Reedy wrote: > You must be trying to compile 2.7. There may be Linux distributions > that compile this way. You're right, I need 2.7. Any hint which distro has got these settings? > If you want to seriously work with unicode, many

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

2017-11-26 Thread wxjmfauth
Le dimanche 26 novembre 2017 05:53:55 UTC+1, Rustom Mody a ÄCcritâ : > 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

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . Wanderer
On Sunday, November 26, 2017 at 4:10:12 AM UTC-5, Greg Tibbet wrote: > I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit > of Java and trying to learn this new-fangled Python language! > > I've got a small program that uses PIL to create an image, draw some > primitives

Re: connect four (game)

2017-11-26 Thread nospam . Chris Angelico
On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: > The way I write code isn't incrementally top down or bottom up. It's > backwards and forwards. Feedback from different parts means the thing > develops as a whole. Sometimes parts are split into distinct sections, > sometimes

Re: Stopping an iterator and continuing later

2017-11-26 Thread Stefan Ram
r...@zedat.fu-berlin.de (Stefan Ram) writes: >Then you can use pickle or custom methods to save and >restore the object, or get the state from an iterator >and create a new iterator with that state later. One does not always have to write a custom class, for example: main.py import pickle

Re: connect four (game)

2017-11-26 Thread nospam . bartc
On 25/11/2017 23:49, Terry Reedy wrote: > 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

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . Gisle Vanem
Greg Tibbet wrote: > ellipse() uses the method self.draw.draw_ellipse() Okay, fine... > but WHERE is draw_ellipse defined?? What magic is happening there? > I've searched the entire PIL directory tree, and the ONLY two places > draw_ellipse is mentioned are right there in the ellipse()

Re: Stopping an iterator and continuing later (Posting On Python-List P

2017-11-26 Thread november nihal
On Saturday, 25 November 2017 20:59:02 UTC, Lawrence Dâ ÖOliveiro wrote: > On Sunday, November 26, 2017 at 6:43:05 AM UTC+13, novembe...@gmail.com wrote: > > I worked out how to use iterators to generate values one at a time > > then ran into a second problem which is time. Is it possible to > >

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread Stefan Ram
Greg Tibbet writes: >I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit >of Java and trying to learn this new-fangled Python language! Which actually is older than Java. >def ellipse(self, xy, fill=None, outline=None): >"""Draw an ellipse.""" >

Re: connect four (game)

2017-11-26 Thread nospam.alister via Python-list
On Sat, 25 Nov 2017 12:26:52 -0800, namenobodywants wrote: > 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

Re: connect four (game)

2017-11-26 Thread nospam . bartc
On 26/11/2017 14:23, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: >> The way I write code isn't incrementally top down or bottom up. It's >> backwards and forwards. Feedback from different parts means the thing >> develops as a whole. Sometimes parts are

Re: Pros and cons of Python sources?

2017-11-26 Thread nospam . Martin Schöön
Den 2017-11-26 skrev 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

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

2017-11-26 Thread nospam . Serhiy Storchaka
26.11.17 01:59, Terry Reedy D¿D,ÑêDµ: > 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 >>> â

Re: Argh!! Can't wrap my head around this Python stuff!

2017-11-26 Thread nospam . Vincent Vande Vyvre
Le 26/11/17 Ä 10:09, Greg Tibbet a ÄCcritâ : > I'm an old timer, have programmed in Fortran, C, C++, Perl, and a bit > of Java and trying to learn this new-fangled Python language! > > I've got a small program that uses PIL to create an image, draw some > primitives (rectanges, ellipses, etc...)

Re: connect four (game)

2017-11-26 Thread nospam . bartc
On 25/11/2017 16:07, Michael Torrie wrote: > 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

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

2017-11-26 Thread nospam . 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

C-api: Executing several scripts as __main__: globals are gone

2017-11-26 Thread nospam . Hartmut Goebel
Hello, in PyInstaller we execute several Python scripts one after each other. The primary use of this is to run some setup prior to the actual appication. Up to now all scripts shared the same global variables, which worked well for 15 years, but now showed an error. The new code (scratched

  1   2   >