REPL peculiarity

2021-03-11 Thread Rob Cliffe via Python-list
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 you have to leave a blank line after the "def" line.  Why? T

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

Compare word to word files

2021-03-11 Thread CLYMATIC GAMING
Hello , I want to compare word to word files please he me! -- https://mail.python.org/mailman/listinfo/python-list

Re: REPL peculiarity

2021-03-11 Thread Alan Gauld via Python-list
On 11/03/2021 11:01, 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 sec

Re: Application problems

2021-03-11 Thread Anssi Saari
Thomas Jollans writes: > On 10/03/2021 21:50, Mats Wichmann wrote: >> >> For the first one, don't feel too bad, this ("opening the normal >> python") seems to be biting a lot of people recently > > > I wonder why. Python's installation process isn't any different from > most other Windows softwar

Regarding Python installation issue

2021-03-11 Thread APURVA DHOK
Hi, I am Apurva I am facing a problem with the Python installation. After installing any Python version with(32 bit/64bit) on windows the script folder in python is empty please help me to get pip.exe and easy_install.exe Thanks & Regards Apurva Dhok 9145619646 Pune, Maharashtra, India -- https:/

IDLE python

2021-03-11 Thread Yoosuf Oluwatosin via Python-list
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/idle.html#startup-failure. I have gone to the page and followed a

Re: Regarding Python installation issue

2021-03-11 Thread Igor Korot
Hi, On Thu, Mar 11, 2021 at 8:57 AM APURVA DHOK wrote: > > Hi, I am Apurva > I am facing a problem with the Python installation. After installing any > Python version with(32 bit/64bit) on windows the script folder in python is > empty please help me to get pip.exe and easy_install.exe Which pyt

Re: Why assert is not a function?

2021-03-11 Thread Serhiy Storchaka
03.03.21 01:24, Chris Angelico пише: > On Wed, Mar 3, 2021 at 10:22 AM Mirko via Python-list > wrote: >> >> Am 02.03.2021 um 23:09 schrieb Stestagg: >>> Ignoring the question about this feature being particularly useful, it >> >> It is useful because "assert" is primarily (if not purely and >> exc

Re: Application problems

2021-03-11 Thread Barry
> On 10 Mar 2021, at 22:14, Thomas Jollans wrote: > > On 10/03/2021 21:50, Mats Wichmann wrote: >> >> For the first one, don't feel too bad, this ("opening the normal python") >> seems to be biting a lot of people recently > > > I wonder why. Python's installation process isn't any differe

Re: Application problems

2021-03-11 Thread Thomas Jollans
On 11/03/2021 15:06, Anssi Saari wrote: Thomas Jollans writes: On 10/03/2021 21:50, Mats Wichmann wrote: For the first one, don't feel too bad, this ("opening the normal python") seems to be biting a lot of people recently I wonder why. Python's installation process isn't any different from

Re: Why assert is not a function?

2021-03-11 Thread Chris Angelico
On Fri, Mar 12, 2021 at 3:37 AM Serhiy Storchaka wrote: > > 03.03.21 01:24, Chris Angelico пише: > > On Wed, Mar 3, 2021 at 10:22 AM Mirko via Python-list > > wrote: > >> > >> Am 02.03.2021 um 23:09 schrieb Stestagg: > >>> Ignoring the question about this feature being particularly useful, it > >

Re: yield from () Was: Re: weirdness with list()

2021-03-11 Thread Serhiy Storchaka
01.03.21 23:59, Cameron Simpson пише: > On 28Feb2021 23:47, Alan Gauld wrote: >> On 28/02/2021 00:17, Cameron Simpson wrote: >>> BUT... It also has a __iter__ value, which like any Box iterates over >>> the subboxes. For MDAT that is implemented like this: >>> >>> def __iter__(self): >>>

Re: Why assert is not a function?

2021-03-11 Thread Serhiy Storchaka
11.03.21 20:31, Chris Angelico пише: >> assert(expensive_computation()) > > Do you have any asserts like that, or is that a purely theoretical > complaint? I have never once seen anything that costly - usually it'll > be something like checking a length (and this isn't C's strlen, since > Python c

Re: Why assert is not a function?

2021-03-11 Thread Cameron Simpson
On 12Mar2021 05:31, Chris Angelico wrote: >On Fri, Mar 12, 2021 at 3:37 AM Serhiy Storchaka wrote: >> assert(expensive_computation()) > >Do you have any asserts like that, or is that a purely theoretical >complaint? I have never once seen anything that costly - usually it'll >be something like ch

Re: yield from () Was: Re: weirdness with list()

2021-03-11 Thread Chris Angelico
On Fri, Mar 12, 2021 at 8:20 AM Serhiy Storchaka wrote: > > 01.03.21 23:59, Cameron Simpson пише: > > On 28Feb2021 23:47, Alan Gauld wrote: > >> On 28/02/2021 00:17, Cameron Simpson wrote: > >>> BUT... It also has a __iter__ value, which like any Box iterates over > >>> the subboxes. For MDAT tha

Re: Why assert is not a function?

2021-03-11 Thread dn via Python-list
On 12/03/2021 10.26, Cameron Simpson wrote: > On 12Mar2021 05:31, Chris Angelico wrote: >> On Fri, Mar 12, 2021 at 3:37 AM Serhiy Storchaka wrote: >>> assert(expensive_computation()) >> >> Do you have any asserts like that, or is that a purely theoretical >> complaint? I have never once seen anyt

Re: Why assert is not a function?

2021-03-11 Thread Ethan Furman
On 3/11/21 1:45 PM, dn via Python-list wrote: Is assert so much faster/cheaper than try...except...raise? Infinitely faster when they are not there. ;-) Basically, you are looking at two different philosophies: - Always double check, get good error message when something fails vs - check

Re: Why assert is not a function?

2021-03-11 Thread Chris Angelico
On Fri, Mar 12, 2021 at 9:10 AM Ethan Furman wrote: > > On 3/11/21 1:45 PM, dn via Python-list wrote: > > > Is assert so much faster/cheaper than try...except...raise? > > Infinitely faster when they are not there. ;-) > > Basically, you are looking at two different philosophies: > > - Always dou

Friday Finking: following, weirdness with list()

2021-03-11 Thread dn via Python-list
The in-person version of 'Friday Finking' has been set-aside by COVID-precautions. Here's hoping the questions asked below will stimulate some thinking, or mild entertainment... On 02/03/2021 03.10, Grant Edwards wrote: > On 2021-03-01, Greg Ewing wrote: >> On 28/02/21 1:17 pm, Cameron Simpson w

Re: Why assert is not a function?

2021-03-11 Thread dn via Python-list
On 12/03/2021 11.27, Chris Angelico wrote: > On Fri, Mar 12, 2021 at 9:10 AM Ethan Furman wrote: >> >> On 3/11/21 1:45 PM, dn via Python-list wrote: >> >>> Is assert so much faster/cheaper than try...except...raise? >> >> Infinitely faster when they are not there. ;-) >> >> Basically, you are l

Re: Compare word to word files

2021-03-11 Thread jak
Il 11/03/2021 16:08, Dennis Lee Bieber ha scritto: On Thu, 11 Mar 2021 08:07:40 +0100, jak declaimed the following: Il 11/03/2021 05:28, CLYMATIC GAMING ha scritto: Hello , I want to compare word to word files please he me! copy and paset this string onto Google page: how to find differenc

Re: Why assert is not a function?

2021-03-11 Thread Cameron Simpson
On 12Mar2021 12:53, DL Neil wrote: >On 12/03/2021 11.27, Chris Angelico wrote: >> On Fri, Mar 12, 2021 at 9:10 AM Ethan Furman wrote: >>> On 3/11/21 1:45 PM, dn via Python-list wrote: Is assert so much faster/cheaper than try...except...raise? >>> >>> Infinitely faster when they are not ther

Re: Why assert is not a function?

2021-03-11 Thread Chris Angelico
On Fri, Mar 12, 2021 at 3:53 PM Cameron Simpson wrote: > For me, try/except is for when something might reasonably "go wrong" in > normal use, even niche normal use. Whereas assert is for things which > should _never_ occur. Roughly, again for me, try/except if for catching > misuse and assert is

Re: Why assert is not a function?

2021-03-11 Thread Mike Dewhirst
On 12/03/2021 4:31 pm, Chris Angelico wrote: On Fri, Mar 12, 2021 at 3:53 PM Cameron Simpson wrote: For me, try/except is for when something might reasonably "go wrong" in normal use, even niche normal use. Whereas assert is for things which should _never_ occur. Roughly, again for me, try/exce

Re: Why assert is not a function?

2021-03-11 Thread Chris Angelico
On Fri, Mar 12, 2021 at 5:03 PM Mike Dewhirst wrote: > > On 12/03/2021 4:31 pm, Chris Angelico wrote: > > On Fri, Mar 12, 2021 at 3:53 PM Cameron Simpson wrote: > >> For me, try/except is for when something might reasonably "go wrong" in > >> normal use, even niche normal use. Whereas assert is f