Re: Benefits of unicode identifiers

2017-11-24 Thread Terry Reedy
On 11/24/2017 7:12 AM, bartc wrote: π = 3.141; That's great. But how do I type it on my keyboard? How do I view someone else's code on my crappy ASCII text editor? Input is a problem, but for reading, Python comes with a half-way decent Unicode BMP code editor, IDLE. No one needs to use a

Re: Issues encountered while launching the IDLE of python 3.7 64-bit I downloaded recently.

2017-11-24 Thread Terry Reedy
On 11/24/2017 6:39 PM, STEPHINEXT TUTORIALS wrote: On Wed, Nov 22, 2017 at 4:29 AM, STEPHINEXT TUTORIALS < oladejist...@gmail.com> wrote: I just downloaded the new version 3.7 for my windows operating system 64-bits on your site. Does Python itself run? The error I got while launching the

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 'appar

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

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: asyncio loop.call_soon()

2017-11-28 Thread Terry Reedy
On 11/28/2017 11:02 AM, Ian Kelly wrote: On Tue, Nov 28, 2017 at 8:30 AM, ast wrote: Hello Python's doc says about loop.call_soon(callback, *arg): Arrange for a callback to be called as soon as possible. The callback is called after call_soon() returns, when control returns to the event loop.

Re: How to use a regexp here

2017-12-04 Thread Terry Reedy
On 12/4/2017 11:14 AM, Ned Batchelder wrote: On 12/4/17 9:13 AM, Rick Johnson wrote: Perhaps it's not politically correct for me to say this, but i've never been one who cared much about political correctness, so i'm just going to say it... Cecil, feel free to ignore the rest of Rick's message

Re: why won't slicing lists raise IndexError?

2017-12-04 Thread Terry Reedy
On 12/4/2017 1:54 PM, Jason Maldonis wrote: I was extending a `list` and am wondering why slicing lists will never raise an IndexError, even if the `slice.stop` value if greater than the list length. Is there any background on why that doesn't raise an IndexError? Slicing is perhaps most com

Re: why won't slicing lists raise IndexError?

2017-12-06 Thread Terry Reedy
On 12/5/2017 9:23 PM, Rick Johnson wrote: Steve D'Aprano wrote: [...] You've already been told that there's no indication or reason to believe that it is a non-action. You've already been given at least one possible action. It isn't a non- action, it is two distinct actions: - the action you

Re: we want python software

2017-12-06 Thread Terry Reedy
On 12/5/2017 4:39 PM, Igor Korot wrote: Hi, Tony, On Tue, Dec 5, 2017 at 11:10 AM, Tony van der Hoff wrote: On 05/12/17 16:55, Igor Korot wrote: Hi, On Tue, Dec 5, 2017 at 9:10 AM, Jyothiswaroop Reddy wrote: Sir, I am b.tech student I would like to learn python. So please send the

Re: How to use a regexp here

2017-12-08 Thread Terry Reedy
On 12/4/2017 11:14 AM, Ned Batchelder wrote: > On 12/4/17 9:13 AM, Rick Johnson wrote: >> Perhaps it's not politically correct for me to say this, but >> i've never been one who cared much about political >> correctness, so i'm just going to say it... > > Cecil, feel free to ignore the rest of Rick

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

2017-12-09 Thread Terry Reedy
On 12/9/2017 5:57 AM, Gilmeh Serda wrote: And next demands to allow Unicode as keywords in a translated version of Python Python's liberal open source license allows people to revise and distribute their own python or python-like interpreters. I believe there are already a couple of non-eng

Re: Python homework

2017-12-13 Thread Terry Reedy
On 12/13/2017 8:28 AM, bo...@choices.random.py wrote: nick.martin...@aol.com (nick martinez2) writes: def rollDie(number): rolls = [0] * 6 for i in range(0, number): roll=int(random.randint(1,6)) One could just as well use randint(0, 5) and skip the -1 below. rol

Re: Can't start IDLE on mac os x high sierra can't import Tkinter

2017-12-15 Thread Terry Reedy
On 12/15/2017 6:37 AM, ceiussandi...@gmail.com wrote: Hi, I've been trying to get python 3.4.3 (needed for programming course) on my mac, running High Sierra. I've installed python and activetcl 8.5.18 as per instructions. When I start IDLE from finder it flashes in the dock and disappears. Whe

Re: Python Learning

2017-12-16 Thread Terry Reedy
On 12/16/2017 8:26 AM, Marko Rauhamaa wrote: Unfortunately, Python's indentation mechanism makes the REPL too frustrating an environment to type in even the simplest of function definitions, let alone a whole class. The fundamental problem is that most REPLs are for 'command lines', and Pytho

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:/

Re: How to edit a function in an interactive python session?

2017-12-21 Thread Terry Reedy
On 12/20/2017 8:42 PM, Peng Yu wrote: R has the function edit() which allows the editing of the definition of a function. Does python have something similar so that users can edit python functions on the fly? Thanks. https://www.rdocumentation.org/packages/utils/versions/3.4.3/topics/edit In

Re: Regarding the error: TypeError: can’t pickle _thread.lock objects

2017-12-21 Thread Terry Reedy
On 12/21/2017 8:11 AM, Winston Manuel Vijay wrote: Hi, It would be of immense help, if someone could provide a suitable solution or related information that helps to sort out the below stated issue- Ø I had installed the Python version 3.6.4 Ø Then I installed the package: Tensorflow Ø

Re: Using the variable type annotation syntax as a placeholder in a nonlocal scope?

2017-12-22 Thread Terry Reedy
On 12/22/2017 8:53 AM, Kirill Balunov wrote: On Dec 20, 2017 22:43, "Kirill Balunov" wrote: Since PEP 526 -- Syntax for Variable Annotations was approved, in Python 3.6+ it is possible to provide type hint information in the form *x: int*, also the

Re: PyWin32 installer question

2017-12-29 Thread Terry Reedy
On 12/29/2017 11:38 AM, Paul Moore wrote: On 29 December 2017 at 16:04, Skip Montanaro wrote: Thanks. I'll shoot Thomas Heller an email... Actually, make that Christopher Toth. Seems he's the current maintainer. If you get no joy there, then in a week or two, when I next get access to a sy

Re: tkinter MP working like a charm

2017-12-31 Thread Terry Reedy
On 12/30/2017 7:57 PM, Wu Xi wrote: from tkinter import *#I cant see anything wrong with this , it works like a charm This imports about 200 names. A reader may not know which names are builtins and which are imports. There may also be accidental name

Re: tkinter MP working like a charm

2017-12-31 Thread Terry Reedy
On 12/31/2017 8:52 PM, Terry Reedy wrote: To do everything in the main thread, one can replace 'root.mainloop' with loop.run_forever (in the main thread) and repeated root.update calls. Wu Xi's example, rewritten more or less as suggested: from tkinter import * from tkinter im

Scientific Python moving to Python 3 only.

2017-12-31 Thread Terry Reedy
https://github.com/numpy/numpy/blob/master/doc/neps/dropping-python2.7-proposal.rst Numpy people currently plan to stop adding features to their 2.7 branch after Dec 31, 2018 and stop adding bug fixes to the last version supporting 2.7 a year later, Dec 31, 2019. It will remain available for

Re: ... (Posting On Python-List Prohibited)

2018-01-01 Thread Terry Reedy
On 1/1/2018 1:28 PM, Wu Xi wrote: on https://mail.python.org/pipermail/python-list/2018-January/subject.html#start which feeds intocomp.lang.python, a lot of messages are missing. Appearantly there is some oppression scheme going on. Blocking of spamming and trolling prevents o

Re: Simple graphic library for beginners

2018-01-11 Thread Terry Reedy
On 1/11/2018 2:51 PM, bartc wrote: I downloaded Python 3.7. It didn't work. I uninstalled and reinstalled it, this time with the 'set environment variables' option (to allow 'pip' to be typed from anywhere). The recommended way to run pip and similar python code is -m pip install xyz where

Re: Simple graphic library for beginners

2018-01-11 Thread Terry Reedy
On 1/11/2018 3:34 PM, Dietmar Schwertberger wrote: On 1/11/2018 8:51 PM, bartc wrote: I downloaded Python 3.7. It didn't work. I uninstalled and reinstalled it, this time with the 'set environment variables' option (to allow 'pip' to be typed from anywhere). You can't expect that people prov

Re: Simple graphic library for beginners

2018-01-11 Thread Terry Reedy
On 1/11/2018 6:35 PM, Gregory Ewing wrote: bartc wrote: I downloaded Python 3.7. It didn't work. I uninstalled and reinstalled it, this time with the 'set environment variables' option (to allow 'pip' to be typed from anywhere). I suspect some of your problems might have been caused by 'pip'

Re: PSF grant for "Shed Skin" to python 3.x?

2018-01-11 Thread Terry Reedy
On 1/11/2018 4:49 PM, Dan Stromberg wrote: Hi folks. Is anyone on the list familiar with the process of getting a Python Software Foundation grant awarded to a worthy project? And with what's generally considered "worthy"? The best people to answer that are the grants committee. Is there an

Re: Where are the moderators?

2018-01-19 Thread Terry Reedy
On 1/18/2018 11:05 PM, Dennis Lee Bieber wrote: On Thu, 18 Jan 2018 18:42:35 -0700, Bob van der Poel declaimed the following: On Thu, Jan 18, 2018 at 4:28 PM, wrote: On Thursday, January 18, 2018 at 10:38:18 PM UTC, Mike Driscoll wrote: Hi, What happened to the moderators? I have always l

Re: Very strange issues with collections.Mapping

2018-01-19 Thread Terry Reedy
On 1/18/2018 4:37 PM, Jason Swails wrote: Hello! I am running into a very perplexing issue that is very rare, but creeps up and is crashing my app. The root cause of the issue comes down to the following check returning true: isinstance([], collections.Mapping) I confirmed that one *can* reg

Re: Can't get python running

2018-01-20 Thread Terry Reedy
On 1/20/2018 12:16 PM, Jim Sadler wrote: I downloaded python 3.6.4 and although everything about the installation seems correct (path, file size, checking on cmd to see if file installed correctly-it is) the only window that will pop up when I attempt to run it is the set-up window offering to mo

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Terry Reedy
On 1/27/2018 3:15 PM, Jason Qian via Python-list wrote: HI I am a string that contains \r\n\t [Ljava.lang.Object; does not exist*\r\n\t*at com.livecluster.core.tasklet I would like it print as : [Ljava.lang.Object; does not exist tat com.livecluster.core.tasklet Your output

Re: Sentiment analysis using sklearn

2018-01-27 Thread Terry Reedy
On 1/27/2018 4:05 PM, qrious wrote: I am attempting to understand how scikit learn works for sentiment analysis and came across this blog post: https://marcobonzanini.wordpress.com/2015/01/19/sentiment-analysis-with-python-and-scikit-learn The corresponding code is at this location: https://g

Re: Where has the practice of sending screen shots as source code come from?

2018-01-28 Thread Terry Reedy
On 1/28/2018 10:54 AM, Tim Golden wrote: On 28/01/2018 15:04, Steven D'Aprano wrote: I'm seeing this annoying practice more and more often. Even for trivial pieces of text, a few lines, people post screenshots instead of copying the code. This happens on Stackoverflow too. There, one can vote

Re: python not working

2018-01-29 Thread Terry Reedy
On 1/29/2018 10:35 AM, Dan Stromberg wrote: Please google for "pythonw.exe system error: The program can't start because api-ms-win-crt-runtime-|1-1-0.dll is missing from your computer. try reinstalling the program to fix this problem.". I believe the Windows binaries for Python are built with

Re: Import statements and multiprocessing

2018-01-30 Thread Terry Reedy
On 1/30/2018 10:54 AM, Nicholas Cole wrote: I have a strange problem on python 3.6.1 [involving multiprocessing] I think the first thing you should do is upgrade to 3.6.4 to get all the bugfixes since 3.6.4. I am pretty sure there have been some for multiprocessing itself. *Then* see if you

Re: Fwd: Syntax error

2018-02-03 Thread Terry Reedy
On 2/3/2018 2:10 PM, Kevin Doney wrote: Hi. *pip3 install --upgrade tensorflow-gpu* When I try the above command I get SyntaxError: invalid syntax Please help. This group helps those who help the group -- by asking questions with sufficient information to answer. Post the ENTIRE trackback

Re: Fwd: Syntax error

2018-02-03 Thread Terry Reedy
On 2/3/2018 3:38 PM, bob gailer wrote: On 2/3/2018 2:40 PM, Terry Reedy wrote: On 2/3/2018 2:10 PM, Kevin Doney wrote: Hi. *pip3 install --upgrade tensorflow-gpu* When I try the above command I get SyntaxError: invalid syntax Please help. This group helps those who help the group -- by

Re: 3.6.4 IDLE

2018-02-04 Thread Terry Reedy
On 2/4/2018 4:09 PM, Rob Alspach wrote: Hi Everybody! I just installed python 3.6.4 it was a fresh install (no former versions). I have never used python but have some IS background. The videos I am seeing online all show the IDE / IDLE; however, it does not install for me. I am installing from t

Re: Why no '|' operator for dict?

2018-02-05 Thread Terry Reedy
On 2/5/2018 2:35 AM, Frank Millman wrote: I recently learned that you can create a set 'on-the-fly' from two existing sets using the '|' operator - Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license"

Re: libxml2 installation/binding issue with Python 3.6.4

2018-02-05 Thread Terry Reedy
On 2/5/2018 6:11 PM, Priest, Matt wrote: Hello, I am not sure if this is the correct place to post an issue/question like this, but here goes... I've successfully (?) installed Python 3.6.4 and libxml2, with the ultimate goal of installing GTK+ 3.22.0. However, I'm running into this error:

Re: Old format with %

2018-02-14 Thread Terry Reedy
On 2/14/2018 7:54 AM, ast wrote: Le 14/02/2018 à 13:46, ast a écrit : Hello It seems that caracter % can't be escaped  >>>"test %d %" % 7 ValueError: incomplete format  >>>"test %d \%" % 7 ValueError: incomplete format  >>>"test %d" % 7 + "%" 'test 7%'  # OK But is there a way to escape a %

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-17 Thread Terry Reedy
On 2/16/2018 10:22 PM, boB Stepp wrote: This article is written by Nathan Murthy, a staff software engineer at Tesla. The article is found at: https://medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e To add to what other have said: Here is what the author said about word

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-19 Thread Terry Reedy
On 2/19/2018 4:14 AM, Chris Angelico wrote: On Mon, Feb 19, 2018 at 7:40 PM, Alain Ketterlin wrote: Tim Delaney writes: C is statically and weakly typed. Variables know their types at compile time (static typing). It is a feature of the language that you can cast any pointer to any chunk of m

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-20 Thread Terry Reedy
On 2/20/2018 8:38 AM, Antoon Pardon wrote: People praise the dynamic nature of Python here on this list and then often enough seem to recoil when they see a piece of code really using that dynamism. Dynamic typing is the addition of run-time type information (RTTI) to data values. This allow

Re: could use some help with this problem! (Posting On Python-List Prohibited)

2018-02-20 Thread Terry Reedy
On 2/20/2018 7:59 PM, Ben Bacarisse wrote: Lawrence D’Oliveiro writes: On Wednesday, February 21, 2018 at 3:10:25 AM UTC+13, Ben Bacarisse wrote: You almost never /have/ to use nested loops. Has the course got this far without introducing the idea of a function? If you are using a function

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-21 Thread Terry Reedy
On 2/21/2018 3:15 AM, Antoon Pardon wrote: On 21-02-18 06:18, Terry Reedy wrote: On 2/20/2018 8:38 AM, Antoon Pardon wrote: People praise the dynamic nature of Python here on this list and then often enough seem to recoil when they see a piece of code really using that dynamism. ... When

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Terry Reedy
On 2/22/2018 8:36 PM, Python wrote: On Thu, Feb 22, 2018 at 11:29:53PM +1100, Chris Angelico wrote: The idea of the Fibonacci benchmark is to test how effectively an implementation manages large numbers of recursive function calls. Then, fib(36) would normally involve 48,315,633 calls. This ver

Re: How to make Python run as fast (or faster) than Julia

2018-02-23 Thread Terry Reedy
On 2/22/2018 10:31 PM, Python wrote: Why do you care about the 50 million calls? That's crazy -- the important thing is *calculating the Fibonacci numbers as efficiently as possible*. If you are writing practical programs, that's true. But the Julia benchmarks are not practical programs; the

Re: How to make Python run as fast (or faster) than Julia

2018-02-23 Thread Terry Reedy
On 2/23/2018 11:32 AM, Python wrote: On Fri, Feb 23, 2018 at 03:11:36AM -0500, Terry Reedy wrote: Why do you care about the 50 million calls? That's crazy -- the important thing is *calculating the Fibonacci numbers as efficiently as possible*. If you are writing practical programs, t

Re: matrix multiplication

2018-02-25 Thread Terry Reedy
On 2/25/2018 12:45 PM, Seb wrote: Hello, The following is an example of an Nx3 matrix (`uvw`) representing N vectors that need to be multiplied by a 3x3 matrix (generated by `randint_mat` function) and store the result in `uvw_rots`: ---

Re: Questions about `locals` builtin

2018-02-26 Thread Terry Reedy
On 2/26/2018 1:55 PM, Kirill Balunov wrote: Hi, I am a little bit confused with `locals` builtin in these moments: 1. The documentation says that _free varaibles_ are returned, which seems incorrect description. In my mind the term free variable refers to variables used in a function that are n

Re: Detection of ultrasonic side channels in mobile devices with Python?

2018-02-28 Thread Terry Reedy
Instead of berating us for not answering an extremely obscure question, you should have use Ms SearchBox first, like I did to determine whether these are real subjects. On 2/28/2018 5:31 PM, Etienne Robillard wrote: If ultrasonic side channels are a threat to privacy, it is because smart phone

Re: csv module and NULL data byte

2018-02-28 Thread Terry Reedy
On 2/28/2018 8:35 PM, Tim Chase wrote: While inelegant, I've "solved" this with a wrapper/generator f = file(fname, …) g = (line.replace('\0', '') for line in f) reader = csv.reader(g, …) for row in reader: process(row) I think this is elegant in that is cleans the input strea

Re: Ways to make a free variable local to a function?

2018-03-05 Thread Terry Reedy
On 3/5/2018 7:12 AM, Kirill Balunov wrote: Hi, At the moment, in order to slightly speed up the function in Python, free variables are passed as local variables to the function, thereby getting rid of extra look ups. For example, for the following function, I especially do not use list comprehen

Re: Ways to make a free variable local to a function?

2018-03-05 Thread Terry Reedy
On 3/5/2018 9:34 AM, Chris Angelico wrote: On Tue, Mar 6, 2018 at 12:52 AM, Terry Reedy wrote: On 3/5/2018 7:12 AM, Kirill Balunov wrote: # 1. By passing through local variable's default values def func_local_1(numb, _int = int, _float = float, _range = range): You are not req

Re: [python-committers] [RELEASE] Python 3.11 release candidate 1 (3.11.0rc1) is available

2022-08-08 Thread Terry Reedy
On 8/8/2022 12:59 PM, Pablo Galindo Salgado wrote: Python 3.11.0 is almost ready. This release, 3.11.0rc1, is the penultimate release preview. You can get it here: ## This is the first release candidate of Python 3.11 https://www.python.org/downloads/release/python-3110rc1/

Re: Writing a Python3 ttk.Notebook

2021-01-15 Thread Terry Reedy
On 1/15/2021 3:51 PM, Rich Shepard wrote: I want to replace the menu on my application with the more appropriate notebook. After looking at examples in my reference books and on the Web I still cannot get it working properly. IDLE's settings dialog uses a ttk.Notebook. The file is Lib/idlelib

Re: HEKLP

2021-01-15 Thread Terry Reedy
On 1/16/2021 12:23 AM, Z3PS1 wrote: NEED HELP WITH MY IDLE Sent from [1]Mail for Windows 10 References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550986 I answer real IDLE questions, but this looks like spam to drive traffic to the hidden link, so I am ignoring i

Re: Python not Running

2021-01-16 Thread Terry Reedy
On 1/16/2021 3:55 PM, Logan Cranford wrote: I downloaded Python but when I try to run Idle it says it is not found and From where? try how? what is 'it'? Read the section of https://docs.python.org/3/using/index.html appropriate for your system, likely Windows. I should try to redownload it.

Re: A beginning beginner's question about input, output and . . .

2021-01-16 Thread Terry Reedy
On 1/16/2021 9:17 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: A bare minimum skeleton might look something like this: with open(filename) as f: for line in f.readlines(): handle_one_line(f) f.readlines() reads the entire file into a list of lines (strings). If y

Re: list() strange behaviour

2021-01-23 Thread Terry Reedy
On 1/23/2021 2:54 AM, Unknown wrote: Le 20/12/2020 à 21:00, danilob a écrit : b = ((x[0] for x in a)) There is a useless pair of parenthesis b = (x[0] for x in a) b is a GENERATOR expression first list(b) calls next method on b repetedly until b is empty. So it provides the "content" of

Re: help

2021-01-26 Thread Terry Reedy
On 1/26/2021 4:01 AM, Maziar Ghasemi wrote: Hi help me to repair this erorr: Warning: translation file 'git_en_US' could not be loaded. Using default. and download python39.dll Please do not repost, especially the same day. On 1/26/21, Maziar Ghasemi wrote: Hi help me to repair this erorr:

Re: idlelib re-use

2021-01-28 Thread Terry Reedy
On 1/28/2021 5:53 AM, Robin Becker wrote: I googled in vain for instances where parts of idlelib are re-used in a simplistic way. I would like to use the editor functionality in a tkinter window and also probably run code in a subprocess. Are there any examples around that do these sorts of th

Re: Best practice for handling exceptions raised at lower levels?

2021-02-02 Thread Terry Reedy
On 2/1/2021 7:54 PM, Skip Montanaro wrote: However... Network applications being what they are, hiccups are going to happen. In the time since I swapped in the imapclient package, I've also had to catch exceptions raised by lower level modules/packages I wasn't using directly, discovering them o

Re: IDE tools to debug in Python?

2021-02-06 Thread Terry Reedy
On 2/5/2021 3:34 AM, Alan Gauld via Python-list wrote: On 27/01/2021 18:32, flaskee via Python-list wrote: While print() is groovy and all, if anyone runs across a non-pdb python debugger (standalone or IDE-based) please let me know. There are many. But why must it be non-pdb? That seems rat

Re: Files can only be modified in IDLE, but not via Powershell

2021-02-09 Thread Terry Reedy
On 2/8/2021 4:33 PM, Stefan Ritter wrote: Hi, It would be highly appreciated if you could offer me some advice to solve a problem I'm currently facing: I have a Windows 10 ADM64 desktop and a Windows 10 AMD64 Laptop. I wrote some code to insert text in a .txt-file. It works perfectly on my la

Re: Mutable defaults

2021-02-09 Thread Terry Reedy
On 2/9/2021 10:17 AM, Antoon Pardon wrote: Most of us know of the perils of mutable default values. So I came up with the following proof of concept: Which is intended to do what? from inspect import signature as signature_of, Parameter from itertools import zip_longest from copy import copy

Re: Fwd: Inconveniente

2021-02-09 Thread Terry Reedy
This is an English list. There are Spanish lists, such as Esto es lista engleis. Hai listas espanolas. https://mail.python.org/mailman/listinfo/python-es On 2/8/2021 9:13 PM, Juan Jose Reyna Figuera wrote: *Buenas tardes, le escribo breve y puntualmente para reportar este el siguiente error al c

Re: Troubles with Python imports

2021-02-09 Thread Terry Reedy
On 2/9/2021 9:55 AM, Philipp Daher via Python-list wrote: Hello, I’ve just typed „pip install selenium“ into my command prompt on windows 10. Although my computer told me that the requirement was already satisfied, import selenium did not work. So I tried different methods to install it and ty

Re: Fwd: Inconveniente

2021-02-09 Thread Terry Reedy
On 2/9/2021 3:39 PM, dn via Python-list wrote: On 09/02/2021 15.13, Juan Jose Reyna Figuera wrote: [ Translation: matplotlib (and seaborn) not playing-nicely with Python 3.9 64-bit edition on MS-Win 10. Solved by down-grading to Python 3.8 32-bit. ] Yes, there have been problems with certain

Re: Running Jupyter Notebook

2021-02-10 Thread Terry Reedy
On 2/10/2021 9:26 AM, Rafael Llera wrote: I installed Python and jupyter via pip, but when I run jupyter notebook I keep getting the following error. Requirement already satisfied: pyparsing>=2.0.2 in c:\users\mitzi\appdata\roaming\python\python39\site-packages (from packaging->bleach->nbconve

Re: @unittest.skip doesn't print anything in Python <= 3.7

2021-02-12 Thread Terry Reedy
On 2/11/2021 3:25 PM, אורי wrote: Hi, https://stackoverflow.com/questions/66161394/unittest-skip-doesnt-print-anything-in-python-3-7 We are using Django with unittest. Some tests are skipped with the @unittest.skip decorator. But if I run the tests with Python 3.6 or 3.7, I get a number of test

Re: mutating a deque whilst iterating over it

2021-02-12 Thread Terry Reedy
On 2/11/2021 3:22 PM, duncan smith wrote: It seems that I can mutate a deque while iterating over it if I assign to an index, but not if I append to it. Is this the intended behaviour? Does the deque doc say anything about mutation while iterating? (Knowing the author of deque, I would

Re: New Python implementation

2021-02-12 Thread Terry Reedy
On 2/11/2021 5:33 PM, Mr Flibble wrote: On 11/02/2021 22:25, Dan Stromberg wrote: On Thu, Feb 11, 2021 at 2:00 PM Mr Flibble wrote: On 11/02/2021 21:13, Dan Stromberg wrote: Does your project have a name yet?  I'd like to follow it through google alerts or an announcement mailing list. "

Re: New Python implementation

2021-02-13 Thread Terry Reedy
On 2/12/2021 4:42 PM, Mr Flibble wrote: On 12/02/2021 02:45, Terry Reedy wrote: On 2/11/2021 5:33 PM, Mr Flibble wrote: On 11/02/2021 22:25, Dan Stromberg wrote: On Thu, Feb 11, 2021 at 2:00 PM Mr Flibble wrote: On 11/02/2021 21:13, Dan Stromberg wrote: Does your project have a name yet

Re: IDLE

2021-02-16 Thread Terry Reedy
On 2/16/2021 11:52 AM, Mats Wichmann wrote: On 2/16/21 8:09 AM, Will Anderson wrote:     Hi, I hope you are having a good day. I have a small IDLE problem and     can’t seem to fix it. I have a .py file that I want to open using IDLE but     there is no option I have even tried totally wiping

Re: I need some help interpreting this error

2021-02-17 Thread Terry Reedy
On 2/17/2021 10:40 AM, Chris Green wrote: I'm running this using Python 3.7 on a Linux system. Most of the time (i.e. for a couple of days now) the program has been satifactorily delivering mail messages, hundreds of them. However one mail message has provoked the following error:- chris@

Re: use set notation for repr of dict_keys?

2021-02-20 Thread Terry Reedy
On 2/20/2021 2:25 AM, Wolfgang Stöcher wrote: Having a dict like   d = {'one': 1, 'two': 2} the representation of its keys   repr(d.keys()) gives   "dict_keys(['one', 'two'])" But since the keys are unique, wouldn't a representation using the set notation be more intuitive, i.e. what about c

Re: Is there a way to subtract 3 from every digit of a number?

2021-02-20 Thread Terry Reedy
On 2/20/2021 12:02 PM, jak wrote: Il 20/02/2021 15:40, C W ha scritto: Hello everyone, I'm curious if there is a way take number and back each digit by 3 ? 2342 becomes 9019 8475 becomes 5142 5873 becomes 2540 The tricky part is that 2 becomes 9, not -1. Here's my toy example and what I atte

Re: Deleting Python 3.8.5

2021-02-22 Thread Terry Reedy
On 2/22/2021 2:00 PM, Vinicius Costa Marques wrote: Hello there Python team, I’m having this problem were I installed Python 3.9.2 and then went to unistall 3.8.5 but here is the problem the version 3.8.5 dosen’t get deleted properly. The uninstall program says that everything worked but the f

Re: Idle Python issue

2021-02-24 Thread Terry Reedy
On 2/24/2021 5:32 AM, jak wrote: Hello everybody, I encounter a problem using Idle Python in Windows when I use utf8 characters longer than 2 bytes such as the character representing the smile emoticon: The problem is with 'astral' unicode characters, those not in the Basic Multilingual Plan

Re: Tkinter long-running window freezes

2021-02-24 Thread Terry Reedy
On 2/24/2021 6:35 AM, John O'Hagan wrote: Hi list I have a 3.9 tkinter interface that displays data from an arbitrary number of threads, each of which runs for an arbitrary period of time. A frame opens in the root window when each thread starts and closes when it stops. Widgets in the frame and

Re: Tkinter long-running window freezes

2021-02-25 Thread Terry Reedy
On 2/24/2021 6:53 PM, John O'Hagan wrote: On Wed, 24 Feb 2021 11:03:30 -0500 Terry Reedy wrote: On 2/24/2021 6:35 AM, John O'Hagan wrote: [...] I am trying this out on Windows 10, with a wider label (so I can move the window) and a button that changes when pressed, and a sequenti

Re: error of opening Python

2021-02-26 Thread Terry Reedy
On 2/26/2021 12:55 AM, Mladen Gogala via Python-list wrote: On Thu, 25 Feb 2021 17:22:35 +, Botao Liu wrote: Dear Python team, This is my first time using Python, I tried to launch Python and it showed "Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] o

Re: Why assert is not a function?

2021-03-03 Thread Terry Reedy
On 3/1/2021 5:51 PM, Marco Sulla wrote: I have a curiosity. Python, as many languages, has assert as a keyword. Can't it be implemented as a function? Is there an advantage to have it as a keyword? One does not need to turn the test expression into a function. One does not need to wrap the me

Re: Problem with printing statement when condition is false

2021-03-04 Thread Terry Reedy
On 3/4/2021 12:10 PM, Quentin Bock wrote: I won't paste the code into this because it's 164 lines so I will attach a file copy, The alternative to posting too much is to reduce your code to the minimum needed to exhibit the behavior you want to change. Doing so may reveal to you the solutio

Re: Problem with printing statement when condition is false

2021-03-04 Thread Terry Reedy
On 3/4/2021 3:15 PM, Terry Reedy wrote: On 3/4/2021 12:10 PM, Quentin Bock wrote: I won't paste the code into this because it's 164 lines so I will attach a file copy, The alternative to posting too much is to reduce your code to the minimum needed to exhibit the behavior you want

Re: Problem with printing statement when condition is false

2021-03-05 Thread Terry Reedy
On 3/4/2021 4:28 PM, Terry Reedy wrote: Quentin privately sent me 12 lines (which should have been posted here instead), which can be reduced to the following 4 that exhibit his bug. if a == b:     print('correct')     if a != b:     print('incorrect') The bug is

Please don't feed the trolls

2021-03-07 Thread Terry Reedy
Trolling, among other things, is fishing with a moving line, especially with a revolving lure, as from a moving boat. A troll, among other things, is that method or the lure used. On the internet, 'troll' is used metaphorically. A troll is a flashy post designed to catch peoples emotions and

Re: Button placement

2021-03-09 Thread Terry Reedy
On 3/8/2021 9:08 PM, Bischoop wrote: I try for a while place the top button in a a middle of column=0 with span to column2 below so the button being centered to those, tried with canvas as well but with no success. Is someone with Tkinter experience able to advice what I could do? Say more cle

Re: "unexpected argument"

2021-03-09 Thread Terry Reedy
On 3/9/2021 3:03 PM, Quentin Bock wrote: Error 1: Space Invaders.py:90: SyntaxWarning: "is" with a literal. Did you mean "=="? if bullet_state is "fire": Multiple string objects can have the same string value. Just because bullet_state == 'fire' does not mean that it *is* the particular ob

Re: Application problems

2021-03-11 Thread Terry Reedy
On 3/10/2021 2:25 PM, Yoosuf Oluwatosin via Python-list wrote: I have downloaded python 3.9.2 on my hp laptop with windows 10 and tried opening both the normal python and the idle python on my pc but the norml keeps opening the modify, repair and uninstall page while the idle keeps giving a s

Re: REPL peculiarity

2021-03-11 Thread Terry Reedy
On 3/11/2021 6:01 AM, Rob Cliffe via Python-list wrote: This is a valid Python program: def f(): pass print(f) But at the REPL: >>> def f(): pass ... print(f)   File "", line 2     print(f)     ^ SyntaxError: invalid syntax It doesn't seem to matter what the second line is.  In the REPL y

Re: IDLE python

2021-03-13 Thread Terry Reedy
On 3/11/2021 10:28 AM, Yoosuf Oluwatosin via Python-list wrote: I have tried to startup my IDLE python severally but it keeps giving the following message: IDLE’s subprocess didn’t make connection. See the ‘Startup Failure’ section of the IDLE doc online at https://docs.python.org/3/library/

Re: .title() - annoying mistake

2021-03-19 Thread Terry Reedy
On 3/19/2021 6:17 PM, Thomas Jollans wrote: From a quick scan of my (medium-sized) bookshelf, most publishers seem to agree that the thing to do is set the title in all caps. In my quick perusal, this is more true of 'popular' works, whereas 'academic' work are more likely to use titlecase.

Re: python documentation

2021-03-27 Thread Terry Reedy
I answered your actual question, in your original post, separately. But by posting here, and continuing to respond, you implicitly invited extended discussion with questions and opinions. On 3/26/2021 11:15 PM, pyt...@blackward.eu wrote: in response to Chris Angelico, a long-time python-list

Re: python documentation

2021-03-27 Thread Terry Reedy
I would like to suggest adding "Blythooon" to the list under "Other parties have re-packaged CPython" listed here: https://www.python.org/download/alternatives/ Your title is misleading because you are proposing a change to a python.org website page, not the 'Python documentation'. That te

Re: python documentation

2021-03-27 Thread Terry Reedy
On 3/27/2021 1:20 AM, pyt...@blackward.eu wrote: By the way, some months ago I started trying to migrate to Python 3 and gave up in favor of creating said compilation. Why? What was biggest roadblock? Compatibility of Python and its Packages decreased with V3 significantly. I don't believ

Re: Access to python37_d.lib

2021-03-27 Thread Terry Reedy
On 3/27/2021 11:34 AM, Kathleen Kennedy wrote: When matplotlib-cpp from GitHub is used to add graphics to a Visual Studio C++ Console application the following error is obtained: Cannot open python37_d.lib. The error was not resolved by re-installing python, including debug files. Any assistan

<    8   9   10   11   12   13   14   15   16   17   >