Re: Python's method-resolution algorithm: An implementation question

2017-08-15 Thread Evan Aad
Thanks! On Tue, Aug 15, 2017 at 10:41 PM, Ian Kelly wrote: > > On Tue, Aug 15, 2017 at 12:57 PM, Evan Aad wrote: > > I don't see how, since the L(B*)'s are listed in order in the argument > > list: L(B1), L(B2), ..., and each L(B*) starts with B*: L(B1) = > ...>, L(B2) = , ... > > > > Could you

Re: Proposed new syntax

2017-08-15 Thread Ben Finney
Gregory Ewing writes: > The whole reason to write something as a comprehension is because you > want to express it declaratively. You're saying "this is the list I > want, I don't care how you compute it." That's certainly a strong reason for my choosing comprehension expressions: when I don't w

Re: Proposed new syntax

2017-08-15 Thread Gregory Ewing
Steve D'Aprano wrote: I take issue with your statement that relying on order of evaluation is always "a very bad idea". Perhaps what I should say is that relying on side effects in an expression occurring in a particular order is a bad idea. Boolean operators are a well-understood special case

Re: numpy not working any more

2017-08-15 Thread breamoreboy
On Tuesday, August 15, 2017 at 8:13:19 PM UTC+1, Poul Riis wrote: > Den tirsdag den 15. august 2017 kl. 19.19.15 UTC+2 skrev bream...@gmail.com: > > On Tuesday, August 15, 2017 at 5:23:29 PM UTC+1, Poul Riis wrote: > > > Den tirsdag den 15. august 2017 kl. 07.29.05 UTC+2 skrev dieter: > > > > Poul

Re: Python's method-resolution algorithm: An implementation question

2017-08-15 Thread Ian Kelly
On Tue, Aug 15, 2017 at 12:57 PM, Evan Aad wrote: > I don't see how, since the L(B*)'s are listed in order in the argument > list: L(B1), L(B2), ..., and each L(B*) starts with B*: L(B1) = ...>, L(B2) = , ... > > Could you please give a counter-example? Sure. merge(, ) -> vs: merge(, , )

Re: A question on modification of a list via a function invocation

2017-08-15 Thread Fred Stluka
Here is my attempt to clarify the situation with some ascii graphics. (Well, not ascii, but utf-8 box-drawing characters — I hope they come through ok. And, of curse, it won't display properly with a proportional font.) Here's a VERY useful tool for understanding/explaining/drawing such code

Re: numpy not working any more

2017-08-15 Thread Poul Riis
Den tirsdag den 15. august 2017 kl. 19.19.15 UTC+2 skrev bream...@gmail.com: > On Tuesday, August 15, 2017 at 5:23:29 PM UTC+1, Poul Riis wrote: > > Den tirsdag den 15. august 2017 kl. 07.29.05 UTC+2 skrev dieter: > > > Poul Riis writes: > > > > ... > > > > For some time I have been using python 3.

Re: Python's method-resolution algorithm: An implementation question

2017-08-15 Thread Evan Aad
I don't see how, since the L(B*)'s are listed in order in the argument list: L(B1), L(B2), ..., and each L(B*) starts with B*: L(B1) = , L(B2) = , ... Could you please give a counter-example? On Tue, Aug 15, 2017 at 9:44 PM, Ian Kelly wrote: > > On Tue, Aug 15, 2017 at 9:56 AM, Evan Aad wrote:

Re: A question on modification of a list via a function invocation

2017-08-15 Thread Larry Hudson via Python-list
On 08/14/2017 08:25 PM, Larry Hudson wrote: [snip] Here is my attempt to clarify the situation with some ascii graphics. (Well, not ascii, but utf-8 box-drawing characters — I hope they come through ok. And, of curse, it won't display properly with a proportional font.) The left side is the pr

Re: Python's method-resolution algorithm: An implementation question

2017-08-15 Thread Ian Kelly
On Tue, Aug 15, 2017 at 9:56 AM, Evan Aad wrote: > According to the description of Python's method resolution order (mro) > (https://www.python.org/download/releases/2.3/mro/), a.k.a. C3 > linearization (see Wikipedia), the algorithm can be described as > follows: > > "the linearization of C is th

PyDev 5.9.2 released

2017-08-15 Thread Fabio Zadrozny
PyDev 5.9.2 Release Highlights - *Important* PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. - PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). - *Debugger* - Integrated speedups for Python 3.6 which use the new Python hook which allows the debugge

Re: Proposed new syntax

2017-08-15 Thread Steve D'Aprano
On Tue, 15 Aug 2017 08:26 am, Gregory Ewing wrote: > Ben Finney wrote: >> That the comprehension >> syntax *does not* necessarily connote a procedural loop, but instead can >> quite reasonably be interpreted as its designer intended, a single >> conceptual operation. > > To put it another way: Co

Re: numpy not working any more

2017-08-15 Thread breamoreboy
On Tuesday, August 15, 2017 at 5:23:29 PM UTC+1, Poul Riis wrote: > Den tirsdag den 15. august 2017 kl. 07.29.05 UTC+2 skrev dieter: > > Poul Riis writes: > > > ... > > > For some time I have been using python 3.6.0 on a windows computer. > > > Suddenly, my numpy does not work any more. > > > This

Python's method-resolution algorithm: An implementation question

2017-08-15 Thread Evan Aad
According to the description of Python's method resolution order (mro) (https://www.python.org/download/releases/2.3/mro/), a.k.a. C3 linearization (see Wikipedia), the algorithm can be described as follows: "the linearization of C is the sum of C plus the merge of the linearizations of the parent

Re: numpy not working any more

2017-08-15 Thread Poul Riis
Den tirsdag den 15. august 2017 kl. 07.29.05 UTC+2 skrev dieter: > Poul Riis writes: > > ... > > For some time I have been using python 3.6.0 on a windows computer. > > Suddenly, my numpy does not work any more. > > This one-liner program: > > import numpy as np > > results in the long error messa

Re: Application Error

2017-08-15 Thread Ian Kelly
On Tue, Aug 15, 2017 at 3:37 AM, Alhassan Tom Alfa wrote: > Dear Sir, > > I just downloaded Python on my PH Windows 10 PC but any time I tried to > start the application it always give the following error message; > > Python.exe - Application Error > The application was unable to start correctly (

Re: Application Error

2017-08-15 Thread Bob Gailer
On Aug 15, 2017 9:50 AM, "Alhassan Tom Alfa" wrote: > > Dear Sir, > > I just downloaded Python Exactly what did you download? Where did you download it from? There are 32 bit versions and 64-bit versions. Did you download the one corresponding to your computer? Normally when you download python Yo

Application Error

2017-08-15 Thread Alhassan Tom Alfa
Dear Sir, I just downloaded Python on my PH Windows 10 PC but any time I tried to start the application it always give the following error message; Python.exe - Application Error The application was unable to start correctly (0xc07b). Click Ok to close the application. How this error be corr

Any advice on getting Pyscripter installed & working with Python on Windows 10 computer ?

2017-08-15 Thread TKS
> > > Hi there, > > I am trying to assist my daughter with a school IT task to install Python > & Pyscripter on a Windows 10 notebook. (64 bit system) > > It seems no version of Pyscripter will work - it fails to complete the > installation & ends with an error ("Python could not be properly > init

Re: Proposed new syntax

2017-08-15 Thread Rustom Mody
On Tuesday, August 15, 2017 at 5:48:43 PM UTC+5:30, Steve D'Aprano wrote: > On Tue, 15 Aug 2017 02:54 pm, Rustom Mody wrote: > > > On Monday, August 14, 2017 at 10:35:22 PM UTC+5:30, Terry Reedy wrote: > [...] > >> Suppose stdin contains "a\nb\nc\nd\ne\nf\ng\n". > >> What is the meaning of > >> [i

Re: Proposed new syntax

2017-08-15 Thread Steve D'Aprano
On Tue, 15 Aug 2017 02:54 pm, Rustom Mody wrote: > On Monday, August 14, 2017 at 10:35:22 PM UTC+5:30, Terry Reedy wrote: [...] >> Suppose stdin contains "a\nb\nc\nd\ne\nf\ng\n". >> What is the meaning of >> [input(f"response{i}") for i in range(6)]? >> In Python, the predictable result is >> ['a'

Re: Proposed new syntax

2017-08-15 Thread Steve D'Aprano
On Tue, 15 Aug 2017 01:26 pm, Paul Rubin wrote: > Steve D'Aprano writes: [...] >> In Haskell, you cannot get the last N elements of a list without >> allocating memory for the previous ones. > > lastn n xxs@(x:xs) > | length (take n xs) == n-1 = xxs > | otherwise = lastn n xs >

Re: Redirecting input of IDLE window

2017-08-15 Thread Friedrich Rentsch
On 08/14/2017 10:47 AM, Friedrich Rentsch wrote: Hi, I work interactively in an IDLE window most of the time and find "help (...)" very useful to summarize things. The display comes up directly (doesn't return a text, which I could edit, assign or store). I suspect that there are ways t

Re: Solution Manual Test Bank for South-Western Federal Taxation 2018: Corporations, Partnerships, Estates and Trusts, 41st Edition by Hoffman

2017-08-15 Thread alister via Python-list
On Mon, 14 Aug 2017 15:48:02 -0700, zhilongch64 wrote: Please do the whole world a big favour & NEVER reply to spam if no-one responded this heinous practice would die. -- I hate users you sound like a sysadmin already! -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposed new syntax

2017-08-15 Thread Gregory Ewing
Paul Rubin wrote: Historically (in "naive set theory") we didn't bother with any of this. We could write { S : S \not\in S } for the set of all sets that are not members of themselves. Is S a member of itself ("Russell's paradox")? Either way leads to contradiction. So the comprehension axiom s