Re: Proposed new syntax

2017-08-14 Thread Ian Kelly
On Mon, Aug 14, 2017 at 8:24 PM, Steve D'Aprano wrote: > I think the closest analogy in Python terms would be a generator expression > with > a cache. That's not *quite* the same, because Python is eagerly evaluated and > Haskell is lazily evaluated, but the critical fact (which Ian seems to have

Re: numpy not working any more

2017-08-14 Thread 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 message below. > ... > Traceback (most recent call last): > File > "C:\Users\pr\A

Re: Proposed new syntax

2017-08-14 Thread Rustom Mody
On Monday, August 14, 2017 at 10:35:22 PM UTC+5:30, Terry Reedy wrote: > On 8/14/2017 5:59 AM, Ben Finney wrote: > > > At what point will you accept the feedback: That the comprehension > > syntax *does not* necessarily connote a procedural loop, but instead can > > quite reasonably be interpreted

Re: Proposed new syntax

2017-08-14 Thread Rustom Mody
On Tuesday, August 15, 2017 at 3:57:22 AM UTC+5:30, 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. > >

Re: Proposed new syntax

2017-08-14 Thread Paul Rubin
Paul Rubin writes: > FORALL P. [ P(0) and P(n) -> P(n+1) ] Sorry, that was supposed to say FORALL P. [ (P(0) and P(n) -> P(n+1)) -> forall n. P(n) ] FORALL quantifies over formulas and forall quantifies over numbers. Maybe something is still missing from the above ;-). -- https://mail.pyt

Re: cpython version

2017-08-14 Thread Larry Martell
On Sun, Aug 13, 2017 at 10:59 PM, Gilmeh Serda wrote: > On Sat, 12 Aug 2017 10:24:06 -0400, Larry Martell wrote: > >> now I have prospective client that refuses to run linux, even in a VM. >> So I am tying to get my app running on Windows Server 2016, piece by >> painful piece. > > I hope you char

Re: Proposed new syntax

2017-08-14 Thread Paul Rubin
Marko Rauhamaa writes: > For the non-logicians in the audience, an "axiom schema" is a generator > pattern that produces an infinity of actual axioms. For non-logicians this is not worth worrying about: schemas are basically a technical hack to get around the inability of first-order logic to qu

Re: why k means do not rectangle the red area drawn by harris corner?

2017-08-14 Thread Michael Torrie
On 08/14/2017 07:28 PM, jlada...@itu.edu wrote: > On Monday, August 14, 2017 at 4:41:23 PM UTC-7, Ho Yeung Lee wrote: >> my code can run without error, >> >> you can try to download one of face from search keyword "face" >> and try this script > > You're assuming a lot. From your code: > > f

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

2017-08-14 Thread Larry Hudson via Python-list
On 08/14/2017 01:02 PM, Mok-Kong Shen wrote: Am 14.08.2017 um 21:53 schrieb Ned Batchelder: [snip] def test(alist): alist=[3,6,9] return def test1(alist): alist[0],alist[1],alist[2]=3,6,9 return def test2(alist): alist[0],alist[1],alist[2]=3,6,9 alist=[30,60,90] return

Re: Proposed new syntax

2017-08-14 Thread Paul Rubin
Steve D'Aprano writes: > It's quite clever, actually, in that it gives *pseudo* random-access > with lazy evaluation. You can evaluate the Nth element without > evaluating the earlier ones. But you can't do so without *storing* the > previous ones, they have to be allocated, with only the actual >

Re: Proposed new syntax

2017-08-14 Thread Steve D'Aprano
On Tue, 15 Aug 2017 01:40 am, Chris Angelico wrote: [...] >> A Haskell list comprehension is not a loop at all. > > What if you don't take the first four, but instead take just the tenth > element? Will the preceding elements be calculated too, or do you have > a sparse list? Both. Or neither.

Re: why k means do not rectangle the red area drawn by harris corner?

2017-08-14 Thread jladasky
On Monday, August 14, 2017 at 4:41:23 PM UTC-7, Ho Yeung Lee wrote: > my code can run without error, > > you can try to download one of face from search keyword "face" > and try this script You're assuming a lot. From your code: from PIL import Image # Two lines removed import numpy

Re: why k means do not rectangle the red area drawn by harris corner?

2017-08-14 Thread Ho Yeung Lee
my code can run without error, you can try to download one of face from search keyword "face" and try this script On Tuesday, August 15, 2017 at 4:33:51 AM UTC+8, jlad...@itu.edu wrote: > On Monday, August 14, 2017 at 12:30:21 PM UTC-7, Ho Yeung Lee wrote: > > https://gist.github.com/hoyeunglee/

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

2017-08-14 Thread Ned Batchelder
On 8/14/17 4:18 PM, Mok-Kong Shen wrote: > Am 14.08.2017 um 22:10 schrieb oliver: >> It is not a global because accessing an item of a list does not change >> whether it is global or local. It would only be global if you >> declared it >> global via a "global" statement. Can you give an example, th

Re: Proposed new syntax

2017-08-14 Thread Ben Finney
Steve D'Aprano writes: > On Mon, 14 Aug 2017 07:59 pm, Ben Finney wrote: > > You began by asking what people would expect syntax to mean. > > > > Then you expressed surprise that anyone would think a comprehension > > would be interpreted by the reader as a single operation. > > Yes, and I stand

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

2017-08-14 Thread zhilongch64
On Friday, June 30, 2017 at 3:03:05 PM UTC-5, Test Banks wrote: > Greetings, > > We do have Solution Manuals and Test Bank for SOUTH-WESTERN FEDERAL TAXATION > 2018: CORPORATIONS, PARTNERSHIPS, ESTATES AND TRUSTS 41st EDITION BY HOFFMAN > at reasonable price. You can get above mentioned resource

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

2017-08-14 Thread zhilongch64
On Friday, June 30, 2017 at 3:03:05 PM UTC-5, Test Banks wrote: > Greetings, > > We do have Solution Manuals and Test Bank for SOUTH-WESTERN FEDERAL TAXATION > 2018: CORPORATIONS, PARTNERSHIPS, ESTATES AND TRUSTS 41st EDITION BY HOFFMAN > at reasonable price. You can get above mentioned resource

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

2017-08-14 Thread MRAB
On 2017-08-14 20:21, Mok-Kong Shen wrote: [snip] I could more or less understand that in test() alist is interpreted as local but in the extended program below in test2() I first write the same as in test1(), after which I logically assume that the name alist is now known as global and then I wr

Re: why k means do not rectangle the red area drawn by harris corner?

2017-08-14 Thread Ho Yeung Lee
i would like to ask whether at line dd = dst>0.01*dst.max() and the part of code below from script, whether write wrong in array access or assignment testing1 = zip(*np.where(dd == 1)) locations = testing1 testing1 = [list((float(elem[0]),float(elem[1]))) for elem in testing1]

Re: Proposed new syntax

2017-08-14 Thread Gregory Ewing
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: Consider that a comprehension is an expression, and I think most peop

Re: why k means do not rectangle the red area drawn by harris corner?

2017-08-14 Thread jladasky
On Monday, August 14, 2017 at 12:30:21 PM UTC-7, Ho Yeung Lee wrote: > https://gist.github.com/hoyeunglee/df7e6cb9b76c576b26fd2bb2b26bfe2f > > sample image > https://drive.google.com/file/d/0Bxs_ao6uuBDUY09qM1JMWS1Ob0k/view?usp=sharing > > would like to rectangle bound the eye ,mouth corner etc

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

2017-08-14 Thread Mok-Kong Shen
Am 14.08.2017 um 22:10 schrieb oliver: It is not a global because accessing an item of a list does not change whether it is global or local. It would only be global if you declared it global via a "global" statement. Can you give an example, that would help determine the issue. If without a glo

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

2017-08-14 Thread oliver
It is not a global because accessing an item of a list does not change whether it is global or local. It would only be global if you declared it global via a "global" statement. Can you give an example, that would help determine the issue. On Mon, 14 Aug 2017 at 16:06 Mok-Kong Shen wrote: > Am 1

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

2017-08-14 Thread Mok-Kong Shen
Am 14.08.2017 um 21:53 schrieb Ned Batchelder: On 8/14/17 3:21 PM, Mok-Kong Shen wrote: Am 14.08.2017 um 20:50 schrieb Ned Batchelder: On 8/14/17 2:21 PM, Mok-Kong Shen wrote: I ran the attached program and got the following output: [1, 2, 3] [3, 6, 9] I don't understand why the modification

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

2017-08-14 Thread Ned Batchelder
On 8/14/17 3:21 PM, Mok-Kong Shen wrote: > Am 14.08.2017 um 20:50 schrieb Ned Batchelder: >> On 8/14/17 2:21 PM, Mok-Kong Shen wrote: >>> I ran the attached program and got the following output: >>> >>> [1, 2, 3] >>> [3, 6, 9] >>> >>> I don't understand why the modification doesn't work in the case

why k means do not rectangle the red area drawn by harris corner?

2017-08-14 Thread Ho Yeung Lee
https://gist.github.com/hoyeunglee/df7e6cb9b76c576b26fd2bb2b26bfe2f sample image https://drive.google.com/file/d/0Bxs_ao6uuBDUY09qM1JMWS1Ob0k/view?usp=sharing would like to rectangle bound the eye ,mouth corner etc which detected by harris corner but using kmeans can not rectangle the red area

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

2017-08-14 Thread Mok-Kong Shen
Am 14.08.2017 um 20:50 schrieb Ned Batchelder: On 8/14/17 2:21 PM, Mok-Kong Shen wrote: I ran the attached program and got the following output: [1, 2, 3] [3, 6, 9] I don't understand why the modification doesn't work in the case of test() but does work in the case of test1(). Thanks for your

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

2017-08-14 Thread Ned Batchelder
On 8/14/17 2:21 PM, Mok-Kong Shen wrote: > I ran the attached program and got the following output: > > [1, 2, 3] > [3, 6, 9] > > I don't understand why the modification doesn't work in the case of > test() but does work in the case of test1(). > > Thanks for your help in advance. > > M. K. Shen >

Re: Running flask server under virtualenv

2017-08-14 Thread Frustrated learner
Here is the complete stack trace Traceback (most recent call last): File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.fram

A question on modification of a list via a function invocation

2017-08-14 Thread Mok-Kong Shen
I ran the attached program and got the following output: [1, 2, 3] [3, 6, 9] I don't understand why the modification doesn't work in the case of test() but does work in the case of test1(). Thanks for your help in advance. M. K. Shen ---

Re: Running flask server under virtualenv

2017-08-14 Thread Frustrated learner
My bad. I was playing around with it. It should be: from swagger_server.models.binary import Binary -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposed new syntax

2017-08-14 Thread Terry Reedy
On 8/14/2017 5:59 AM, Ben Finney wrote: At what point will you accept the feedback: 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. In a world where function

Re: Proposed new syntax

2017-08-14 Thread Rustom Mody
http://www.cosc.canterbury.ac.nz/greg.ewing/python/listcomp/ Greg's 1999 announcement. If you see the "semantics are equivalent" Steven wins. If you focus on "like other languages" then it's... well not quite equivalent! We can take our pick! For myself, as I earlier said, if python disagrees

Re: Proposed new syntax

2017-08-14 Thread Chris Angelico
On Tue, Aug 15, 2017 at 1:54 AM, Ian Kelly wrote: > On Mon, Aug 14, 2017 at 9:40 AM, Chris Angelico wrote: >> On Tue, Aug 15, 2017 at 1:33 AM, Ian Kelly wrote: >>> On Sun, Aug 13, 2017 at 8:36 AM, Steve D'Aprano Sure. In Haskell, comprehensions are *implicit* loops, rather than explic

Re: Proposed new syntax

2017-08-14 Thread Ian Kelly
On Mon, Aug 14, 2017 at 9:40 AM, Chris Angelico wrote: > On Tue, Aug 15, 2017 at 1:33 AM, Ian Kelly wrote: >> On Sun, Aug 13, 2017 at 8:36 AM, Steve D'Aprano >>> Sure. In Haskell, comprehensions are *implicit* loops, rather than explicit >>> like >>> in Python. >> >> No, they aren't. Haskell lis

Re: Redirecting input of IDLE window

2017-08-14 Thread Terry Reedy
On 8/14/2017 6:19 AM, Joel Goldstick wrote: do you know about the utility called pydoc? Type it at a command line to learn more. This only works if a wrapper has been installed in a directory on the system path. 'python -m pydoc' should always work. It displays information like help doe

Re: Proposed new syntax

2017-08-14 Thread Chris Angelico
On Tue, Aug 15, 2017 at 1:33 AM, Ian Kelly wrote: > On Sun, Aug 13, 2017 at 8:36 AM, Steve D'Aprano >> Sure. In Haskell, comprehensions are *implicit* loops, rather than explicit >> like >> in Python. > > No, they aren't. Haskell list comprehensions use lazy evaluation. > Here's an example of an

Re: Redirecting input of IDLE window

2017-08-14 Thread Terry Reedy
A better subject line would have been Redirecting output interactive help(ob). On 8/14/2017 4:47 AM, Friedrich Rentsch wrote: 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

Re: Proposed new syntax

2017-08-14 Thread Ian Kelly
On Sun, Aug 13, 2017 at 8:36 AM, Steve D'Aprano wrote: > On Sat, 12 Aug 2017 01:02 am, Ian Kelly wrote: > >> On Thu, Aug 10, 2017 at 11:45 PM, Steve D'Aprano >> wrote: > >>> Comprehension syntax makes the sequential loop explicit: the loop is right >>> there in the syntax: >>> >>> [expr for x in

Re: Running flask server under virtualenv

2017-08-14 Thread Steve D'Aprano
On Tue, 15 Aug 2017 01:08 am, Frustrated Learner wrote: > I am getting the following error when running flask server. I have a model > called binary. I am guessing a path issue. In the model, the code is: > > from __future__ import absolute_import > from swagger_server.models.binary import Binary

Re: Proposed new syntax

2017-08-14 Thread Steve D'Aprano
On Mon, 14 Aug 2017 07:59 pm, Ben Finney wrote: > Steven D'Aprano writes: > >> On Sun, 13 Aug 2017 21:06:08 -0700, Rustom Mody wrote: >> >> > Here's a bunch of different ways in which a mapping comprehension >> > could be implemented: >> >> Not in Python they couldn't be > > You began by asking

Running flask server under virtualenv

2017-08-14 Thread Frustrated Learner
Hello, I am using Python 3.62 on a mac. I am working under a virtualenv. I generated server code via http://editor.swagger.io (Swagger UI) Steps to reproduce python3 -m venv flaskglobal source flaskglobal/bin/activate cp binary to flaskglobal and unzip contents cd python-flask-server pip install

Re: Redirecting input of IDLE window

2017-08-14 Thread Peter Otten
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 to redirect the di

Re: Proposed new syntax

2017-08-14 Thread Steve D'Aprano
On Mon, 14 Aug 2017 09:03 pm, Rustom Mody wrote: > For myself, if the python docs contradict the last 100 years or prior art/math > history, the latter takes precedence When theory disagrees with the facts, you ignore the facts? > All I want to say is the gratuitous incidental resemblance of fo

Re: wrote a commodore-64 emulator using just Python

2017-08-14 Thread Irmen de Jong
On 08/13/2017 03:50 PM, Irmen de Jong wrote: > Now, it's not a "true" emulator: obviously it doesn't simulate the C64 on a > hardware > level. It does however implement enough to load and run simple basic programs > that can > show interesting PETSCII pictures by manipulating the colors and char

Re: data ecosystem

2017-08-14 Thread Steve D'Aprano
On Mon, 14 Aug 2017 12:13 pm, Rustom Mody wrote: > On Sunday, August 13, 2017 at 6:04:42 AM UTC+5:30, Man with No Name wrote: [...] >> The namespace could be a global, synchronized object repository as well as >> holding local copies. > > I ‘Mark’ the piquant point that the ‘Man with No Name’ wis

Re: Proposed new syntax

2017-08-14 Thread Rustom Mody
On Monday, August 14, 2017 at 3:30:39 PM UTC+5:30, Ben Finney wrote: > Steven D'Aprano writes: > > > On Sun, 13 Aug 2017 21:06:08 -0700, Rustom Mody wrote: > > > > > Here's a bunch of different ways in which a mapping comprehension > > > could be implemented: > > > > Not in Python they couldn't be

Re: Redirecting input of IDLE window

2017-08-14 Thread Joel Goldstick
On Mon, Aug 14, 2017 at 4: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 t

Re: Proposed new syntax

2017-08-14 Thread Ben Finney
Steven D'Aprano writes: > On Sun, 13 Aug 2017 21:06:08 -0700, Rustom Mody wrote: > > > Here's a bunch of different ways in which a mapping comprehension > > could be implemented: > > Not in Python they couldn't be You began by asking what people would expect syntax to mean. Then you expressed s

Re: Proposed new syntax

2017-08-14 Thread Marko Rauhamaa
Jussi Piitulainen : > However, I did find there a nice name for this axiom schema based on > yet another of its many names: "erotteluskeema" ("schema of > separation"). I like that. For the non-logicians in the audience, an "axiom schema" is a generator

Re: Proposed new syntax

2017-08-14 Thread Jussi Piitulainen
Paul Rubin writes: >> Jussi Piitulainen writes: >>> But what is "set comprehension" in French, German, or Finnish? > > The idea comes from set theory: for some reason English Wikipedia > doesn't have Finnish cross-wiki links for most of the relevant terms, > but Google translates "axiom of specif

Re: Proposed new syntax

2017-08-14 Thread Steven D'Aprano
On Sun, 13 Aug 2017 21:06:08 -0700, Rustom Mody wrote: > Here's a bunch of different ways in which a mapping comprehension could > be implemented: Not in Python they couldn't be, since Python promises deterministic, first-to-last evaluation in the same order as the equivalent for-loop. Wh

Redirecting input of IDLE window

2017-08-14 Thread Friedrich Rentsch
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 to redirect the display, say to a file. Thanks for s

Re: Proposed new syntax

2017-08-14 Thread Paul Rubin
Steve D'Aprano writes: > And very possibly the first language with comprehensions, SETL (from 1969), > used "forall" ... It goes back much further, probably to Principia Mathematica, or (with different notation) maybe Frege's Foundations of Arithmetic: https://en.wikipedia.org/wiki/Set-builde

Re: Proposed new syntax

2017-08-14 Thread Paul Rubin
Marko Rauhamaa writes: > Jussi Piitulainen : >> But what is "set comprehension" in French, German, or Finnish? The idea comes from set theory: for some reason English Wikipedia doesn't have Finnish cross-wiki links for most of the relevant terms, but Google translates "axiom of specification" as

numpy not working any more

2017-08-14 Thread Poul Riis
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 message below. In an effort to solve the problem I tried to install python 3.6.2 followed by all the modules I need. H