Re: Proposed new syntax

2017-08-12 Thread Jussi Piitulainen
Rustom Mody writes:

> [ My conjecture: The word ‘comprehension’ used this way in English is
> meaningless and is probably an infelicious translation of something
> which makes sense in German]

From a Latin word for "taking together", through Middle French,
according to this source, which has further details:

https://en.wiktionary.org/wiki/comprehension
https://en.wiktionary.org/wiki/comprehensio#Latin
https://en.wiktionary.org/wiki/comprehendo#Latin
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread Marko Rauhamaa
Jussi Piitulainen :

> Rustom Mody writes:
>> [ My conjecture: The word ‘comprehension’ used this way in English is
>> meaningless and is probably an infelicious translation of something
>> which makes sense in German]
>
> From a Latin word for "taking together", through Middle French,

Metaphors' galore:

   English: understand < stand under something
   French:  comprendre < take something in
   German:  verstehen  < stand in front of something
   Finnish: ymmärtää   < surround something

all mean the same thing.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread Jussi Piitulainen
Marko Rauhamaa writes:

> Jussi Piitulainen writes:
>
>> Rustom Mody writes:
>>> [ My conjecture: The word ‘comprehension’ used this way in English is
>>> meaningless and is probably an infelicious translation of something
>>> which makes sense in German]
>>
>> From a Latin word for "taking together", through Middle French,
>
> Metaphors' galore:
>
>English: understand < stand under something
>French:  comprendre < take something in
>German:  verstehen  < stand in front of something
>Finnish: ymmärtää   < surround something
>
> all mean the same thing.

English also has "comprehend" (in English it seems to me opaque).

Finnish also has "käsittää" 'understand' < 'get a hold of', from "käsi"
'hand' (at least it looks to me like it might be so derived).

But what is "set comprehension" in French, German, or Finnish?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread Peter Otten
Rustom Mody wrote:

> [ My conjecture: The word ‘comprehension’ used this way in English is
> meaningless and is probably an infelicious translation of something which
> makes sense in German]

The meaning of comprehension is probably closer to "comprise" than 
"comprehend".

https://en.wiktionary.org/wiki/comprise
"""
...from Latin comprehendere...

...To be made up of; to consist of...
"""


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread Rustom Mody
On Saturday, August 12, 2017 at 5:25:43 PM UTC+5:30, Peter Otten wrote:
> Rustom Mody wrote:
> 
> > [ My conjecture: The word ‘comprehension’ used this way in English is
> > meaningless and is probably an infelicious translation of something which
> > makes sense in German]
> 
> The meaning of comprehension is probably closer to "comprise" than 
> "comprehend".
> 
> https://en.wiktionary.org/wiki/comprise
> """
> ...from Latin comprehendere...
> 
> ...To be made up of; to consist of...
> """

Yeah… I guessed something like that

1,2,3,4
is ‘just’ a set
which, when we put brackets round them
{1,2,3,4}
is, well, 'comprised' :-)

Sounds silly… Less so if we say it as “The set comprising of…"

[In all probability when Zermelo/Fraenkel were doing their stuff 
they did not really distinguish between what today python calls
a set-literal and a set-comprehension]
-- 
https://mail.python.org/mailman/listinfo/python-list


cpython version

2017-08-12 Thread Larry Martell
For the first time in my 30+ year career I am, unfortunately, working
on Windows.  A package I need, rpy2, comes in various flavors for
different cpython versions:

rpy2‑2.7.8‑cp27‑none‑win32.whl
rpy2‑2.7.8‑cp27‑none‑win_amd64.whl
rpy2‑2.7.8‑cp34‑none‑win32.whl
rpy2‑2.7.8‑cp34‑none‑win_amd64.whl
rpy2‑2.7.8‑cp35‑none‑win32.whl
rpy2‑2.7.8‑cp35‑none‑win_amd64.whl
rpy2‑2.8.6‑cp35‑cp35m‑win32.whl
rpy2‑2.8.6‑cp35‑cp35m‑win_amd64.whl
rpy2‑2.8.6‑cp36‑cp36m‑win32.whl
rpy2‑2.8.6‑cp36‑cp36m‑win_amd64.whl

I am running python version 2.7.13. How can I find out my cpython version?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: cpython version

2017-08-12 Thread Larry Martell
On Sat, Aug 12, 2017 at 8:22 AM, Larry Martell  wrote:
> For the first time in my 30+ year career I am, unfortunately, working
> on Windows.  A package I need, rpy2, comes in various flavors for
> different cpython versions:
>
> rpy2‑2.7.8‑cp27‑none‑win32.whl
> rpy2‑2.7.8‑cp27‑none‑win_amd64.whl
> rpy2‑2.7.8‑cp34‑none‑win32.whl
> rpy2‑2.7.8‑cp34‑none‑win_amd64.whl
> rpy2‑2.7.8‑cp35‑none‑win32.whl
> rpy2‑2.7.8‑cp35‑none‑win_amd64.whl
> rpy2‑2.8.6‑cp35‑cp35m‑win32.whl
> rpy2‑2.8.6‑cp35‑cp35m‑win_amd64.whl
> rpy2‑2.8.6‑cp36‑cp36m‑win32.whl
> rpy2‑2.8.6‑cp36‑cp36m‑win_amd64.whl
>
> I am running python version 2.7.13. How can I find out my cpython version?

Never mind - not enough sleep or coffee. Obviously cp27 for python 2.7.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread Tim Chase
On 2017-08-11 00:28, Steve D'Aprano wrote:
> What would you expect this syntax to return?
> 
> [x + 1 for x in (0, 1, 2, 999, 3, 4) while x < 5]

[1, 2, 3]

I would see this "while-in-a-comprehension" as a itertools.takewhile()
sort of syntactic sugar:

>>> [x + 1 for x in takewhile(lambda m: m < 5, (0,1,2,999,3,4))]
[1, 2, 3]



> For comparison, what would you expect this to return?
[snip]
> [x + y for x in (0, 1, 2, 999, 3, 4) while x < 5 for y in (100,
> 200)]

This one could make sense as either

[100, 200, 101, 201, 102, 202]

or

[100, 101, 102]

(I think the default evaluation order of nested "for"s in a
comprehension would produce the former rather than the latter)

Thus it would be good to define behavior for both of these cases:

[x + y for x in (0, 1, 2, 999, 3, 4) while x < 5 for y in (100, 200)]

vs.

[x + y for x in (0, 1, 2, 999, 3, 4) for y in (100, 200) while x < 5]

-tkc



Things would get even weirder when you have nested loopings like
that and one of the sources is an iterator.

-tkc




-- 
https://mail.python.org/mailman/listinfo/python-list


Re: cpython version

2017-08-12 Thread Chris Angelico
On Sat, Aug 12, 2017 at 10:24 PM, Larry Martell  wrote:
> On Sat, Aug 12, 2017 at 8:22 AM, Larry Martell  
> wrote:
>> For the first time in my 30+ year career I am, unfortunately, working
>> on Windows.  A package I need, rpy2, comes in various flavors for
>> different cpython versions:
>>
>> rpy2‑2.7.8‑cp27‑none‑win32.whl
>> rpy2‑2.7.8‑cp27‑none‑win_amd64.whl
>> rpy2‑2.7.8‑cp34‑none‑win32.whl
>> rpy2‑2.7.8‑cp34‑none‑win_amd64.whl
>> rpy2‑2.7.8‑cp35‑none‑win32.whl
>> rpy2‑2.7.8‑cp35‑none‑win_amd64.whl
>> rpy2‑2.8.6‑cp35‑cp35m‑win32.whl
>> rpy2‑2.8.6‑cp35‑cp35m‑win_amd64.whl
>> rpy2‑2.8.6‑cp36‑cp36m‑win32.whl
>> rpy2‑2.8.6‑cp36‑cp36m‑win_amd64.whl
>>
>> I am running python version 2.7.13. How can I find out my cpython version?
>
> Never mind - not enough sleep or coffee. Obviously cp27 for python 2.7.

Correct. I'd take it one further, though, and suggest that you
shouldn't need to match it yourself; just use pip to download and
install the right wheel. It'll match versions, architectures, and
anything else it needs to match.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: cpython version

2017-08-12 Thread Larry Martell
On Sat, Aug 12, 2017 at 10:09 AM, Chris Angelico  wrote:
> On Sat, Aug 12, 2017 at 10:24 PM, Larry Martell  
> wrote:
>> On Sat, Aug 12, 2017 at 8:22 AM, Larry Martell  
>> wrote:
>>> For the first time in my 30+ year career I am, unfortunately, working
>>> on Windows.  A package I need, rpy2, comes in various flavors for
>>> different cpython versions:
>>>
>>> rpy2‑2.7.8‑cp27‑none‑win32.whl
>>> rpy2‑2.7.8‑cp27‑none‑win_amd64.whl
>>> rpy2‑2.7.8‑cp34‑none‑win32.whl
>>> rpy2‑2.7.8‑cp34‑none‑win_amd64.whl
>>> rpy2‑2.7.8‑cp35‑none‑win32.whl
>>> rpy2‑2.7.8‑cp35‑none‑win_amd64.whl
>>> rpy2‑2.8.6‑cp35‑cp35m‑win32.whl
>>> rpy2‑2.8.6‑cp35‑cp35m‑win_amd64.whl
>>> rpy2‑2.8.6‑cp36‑cp36m‑win32.whl
>>> rpy2‑2.8.6‑cp36‑cp36m‑win_amd64.whl
>>>
>>> I am running python version 2.7.13. How can I find out my cpython version?
>>
>> Never mind - not enough sleep or coffee. Obviously cp27 for python 2.7.
>
> Correct. I'd take it one further, though, and suggest that you
> shouldn't need to match it yourself; just use pip to download and
> install the right wheel. It'll match versions, architectures, and
> anything else it needs to match.

Problem is that rpy2 will not install with pip. It gets:

Error: Tried to guess R's HOME but no command 'R' in the PATH.

Even though R's HOME is in the PATH.

Googling this I found it's a very common problem, with no solution I
could find. I finally found a post by the author of rpy that says
"There is no official support for Windows,". and he refers people to
this site http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2 that has
'unofficial and unstable' prebuilt windows binaries for it.

If anyone is interested as to why I am embarking on this very
unpleasant task, I have a django app that runs in linux. I have
successfully deployed it with Docker, vagrant/VirtualBox, VMware, kvm,
and on bare metal. But 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.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread Marko Rauhamaa
Jussi Piitulainen :

> But what is "set comprehension" in French, German, or Finnish?

The comprehension principle has to do with the assumption in Naive Set
Theory that for any logical predicate, there is a corresponding set. To
put it in plain English, every adjective is equivalent to a collection
and vice versa.

[I'm sure you know this, Jussi, but not everybody might.]

The Finnish Wikipedia entry uses the term "abstraktioskeema" (Engl.
"abstraction scheme", https://fi.wikipedia.org/wiki/Joukko-oppi#Aksiomaattinen_joukko-oppi>).
I have not heard that term before, and Google doesn't find other hits
for it.

Myself, I might propose the word "koonta" as a simple Finnish
translation for "comprehension".


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread MRAB

On 2017-08-12 09:54, Marko Rauhamaa wrote:

Jussi Piitulainen :


Rustom Mody writes:

[ My conjecture: The word ‘comprehension’ used this way in English is
meaningless and is probably an infelicious translation of something
which makes sense in German]


From a Latin word for "taking together", through Middle French,


Metaphors' galore:

English: understand < stand under something


Its etymology is here:

http://www.etymonline.com/index.php?term=understand


French:  comprendre < take something in
German:  verstehen  < stand in front of something
Finnish: ymmärtää   < surround something

all mean the same thing.


--
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread Marko Rauhamaa
Marko Rauhamaa :

> Jussi Piitulainen :
>
>> But what is "set comprehension" in French, German, or Finnish?
>
> [...]
>
> Myself, I might propose the word "koonta" as a simple Finnish
> translation for "comprehension".

And maybe "culling" or "gleaning" could work in English.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread Glenn Linderman

On 8/12/2017 9:12 AM, MRAB wrote:

On 2017-08-12 09:54, Marko Rauhamaa wrote:

Jussi Piitulainen :


Rustom Mody writes:

[ My conjecture: The word ‘comprehension’ used this way in English is
meaningless and is probably an infelicious translation of something
which makes sense in German]


From a Latin word for "taking together", through Middle French,


Metaphors' galore:

English: understand < stand under something


Its etymology is here:

http://www.etymonline.com/index.php?term=understand


French:  comprendre < take something in
German:  verstehen  < stand in front of something
Finnish: ymmärtää   < surround something

all mean the same thing.

I really don't think that "comprehension" in English, in the manner used 
for Python set manipulation, is equivalent at all to the English word 
"understand". For the Python comprehension, the word is more related to 
"complete", or "exhaustive", as in "comprehensive" (covering all 
possibilities). While a comprehensive explanation of something might 
lead to an understanding of that something, teaching is not really a 
requirement of being comprehensive. Being comprehensive is sometimes a 
good attribute of teaching, or understanding, however. One might think 
they understand something, but they only understand in part, they might 
not have a comprehensive understanding. An example of this is Newtonian 
physics gives an understanding of various physical phenomena, but 
Einstein's theory of relativity shows that Newtonian physics is only a 
partial understanding, not a comprehensive one. And maybe someday 
there'll be a theory that demonstrates that relativity is only a partial 
understanding as well (someone chime in if that is already true!).


Glenn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Recent Spam problem

2017-08-12 Thread J. Clarke
In article , 
skybuck2...@hotmail.com says...
> 
> I see two solutions:
> 
> 1. We build new architecture or adept current one so it's more like a 
> blockchain, have to calculate some hash before being able to post and upload 
> and such.
> 
> or
> 
> 2. We counter-attack by installing a special tool, so we all denial of 
> service attack the source of the message, I am not sure if the source is 
> genuine information, what you make of it:
> 
> NNTP-Posting-Host: 39.52.70.224
> 
> 
> Now the first solution would require a lot of work.
> 
> The second solution would be easy to do.
> 
> My question to you is:
> 
> What solution do you pick of any ? =D

It would be really nice if someone could convince radical Islam that 
spammers are offensive to Mohammed.  After a few of them got hunted down 
and blown up, the rest might take the hint.


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Proposed new syntax

2017-08-12 Thread Jussi Piitulainen
Marko Rauhamaa writes:

> Marko Rauhamaa :
>
>> Jussi Piitulainen :
>>
>>> But what is "set comprehension" in French, German, or Finnish?
>>
>> [...]
>>
>> Myself, I might propose the word "koonta" as a simple Finnish
>> translation for "comprehension".
>
> And maybe "culling" or "gleaning" could work in English.

Nice.
-- 
https://mail.python.org/mailman/listinfo/python-list