Re: [RELEASE] Python 3.6.0b1 is now available

2016-09-14 Thread Serhiy Storchaka
On 14.09.16 17:36, Guido van Rossum wrote: Fortunately that page isn't linked from anywhere on the home page AFAIK. If it is, could someone file an issue in the pydotorg tracker? The url is at the bottom of every page. This is on of the first results (actually the first besides manually edited

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Dale Marvin via Python-list
On 9/14/16 5:40 PM, Steve D'Aprano wrote: If you're going to criticise Asimov, don't criticise him for wrongly thinking that people in the Middle Ages believed in a flat earth. There's no evidence of that in his essay. I didn't mean to criticize Asimov, but the History Professors, one in par

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-14 Thread Paul Rubin
Christian Gollwitzer writes: > http://www.azlyrics.com/lyrics/queen/bohemianrhapsody.html Alt version, https://www.youtube.com/watch?v=hpvlTVgeivU -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the correct form for saying "licensed under the same terms as Python itself"?

2016-09-14 Thread Mark Summerfield
Thanks v. much: I'll use the Apache 2.0 license. -- https://mail.python.org/mailman/listinfo/python-list

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Random832
On Wed, Sep 14, 2016, at 23:12, Steve D'Aprano wrote: > Yes it does. Even an infinitely large flat plane has a horizon almost > identical to the actual horizon. Your link actually doesn't support the latter claim, it goes into some detail on why it wouldn't if it were infinitely large due to gravi

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-14 Thread Marko Rauhamaa
Christian Gollwitzer : > More interestingly, which language is it? First I thought C++ or Java, > but they don't use self and there is a => operator. PHP adornes > variables with $. Another C-derived language which has built-in hash > maps? C#. The => syntax is Python's lambda. Marko -- https:

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-14 Thread Christian Gollwitzer
Am 15.09.16 um 07:01 schrieb Paul Rubin: Travis Griggs writes: for each in ['cake'] + ['eat', 'it'] * 2: print(each) https://pbs.twimg.com/media/Cr-edT2VUAArpVL.jpg http://www.azlyrics.com/lyrics/queen/bohemianrhapsody.html More interestingly, which language is it? First I thou

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-14 Thread Paul Rubin
Travis Griggs writes: > for each in ['cake'] + ['eat', 'it'] * 2: > print(each) https://pbs.twimg.com/media/Cr-edT2VUAArpVL.jpg -- https://mail.python.org/mailman/listinfo/python-list

unexpected rerun program itself when using cv2 and selenium

2016-09-14 Thread meInvent bbird
unexpected rerun program itself when using cv2 and selenium when a script, it is expected to run once and stop but it start a new browser again when using selenium and cv2 d, bbox, filename) File "C:\Python27\lib\site-packages\pyscreenshot\procutil.py", line 28, in run _in_childprocess p.s

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-14 Thread Travis Griggs
> On Sep 13, 2016, at 13:57, rgrigo...@gmail.com wrote: > > It would help newbies and prevent confusion. for each in ['cake'] + ['eat', 'it'] * 2: print(each) -- https://mail.python.org/mailman/listinfo/python-list

Re: Expression can be simplified on list

2016-09-14 Thread Jussi Piitulainen
Rustom Mody writes: > On Wednesday, September 14, 2016 at 5:35:53 PM UTC+5:30, Jussi Piitulainen > wrote: >> Mathematical discussions tend to acknowledge only alternation >> (union), concatenation and iteration (Kleene star) as operations, >> unless they specifically focus on some other operatio

Re: Expression can be simplified on list

2016-09-14 Thread Steve D'Aprano
On Thu, 15 Sep 2016 08:46 am, Lawrence D’Oliveiro wrote: > On Thursday, September 15, 2016 at 9:12:25 AM UTC+12, Ned Batchelder > wrote: >> >> On Wednesday, September 14, 2016 at 5:00:02 PM UTC-4, Lawrence D’Oliveiro >> wrote: >>> >>> On Thursday, September 15, 2016 at 8:13:05 AM UTC+12, Terry Ree

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Steve D'Aprano
On Thu, 15 Sep 2016 11:44 am, Lawrence D’Oliveiro wrote: > On Thursday, September 15, 2016 at 1:26:49 PM UTC+12, Chris Kaynor wrote: >> If you find somebody determined to not trust evidence such as the blue >> marble photos, it can be quite hard to prove that the world is not flat. > > A flat wor

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Lawrence D’Oliveiro
On Thursday, September 15, 2016 at 1:26:49 PM UTC+12, Chris Kaynor wrote: > If you find somebody determined to not trust evidence such as the blue > marble photos, it can be quite hard to prove that the world is not flat. A flat world doesn’t have a horizon. -- https://mail.python.org/mailman/lis

Creating A Pythonic ctypes Binding

2016-09-14 Thread Lawrence D’Oliveiro
ctypes is a wonderful library. If you need to create a Python binding for some library that doesn’t already have one, you should look at ctypes, rather than writing an extension module in C or C++. The odds are, a pure Python implementation using ctyp

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Chris Kaynor
On Wed, Sep 14, 2016 at 1:19 PM, wrote: > It is so blantantly obvious that the world is not flat I find this > discussion flabbergasting. Anybody who has tried to take any form of > vehicle up, or probably more dangerously down, any form of hill knows > that. As for the raving lunatics who make

Re: How could I implement a virtual method and override it in python?

2016-09-14 Thread Steve D'Aprano
On Thu, 15 Sep 2016 08:16 am, wesley.keel...@iugome.com wrote: > Hey guys, I will show the code first: > > Helper.py: > > def Foo( *args ): > print ("This is a callback") > > def Run: > Foo() > > > MyModule.py: > > import Helper > > def Foo( *args ): > print ("I want to be the new callb

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Steve D'Aprano
On Thu, 15 Sep 2016 06:19 am, breamore...@gmail.com wrote: > It is so blantantly obvious that the world is not flat I find this > discussion flabbergasting. You wouldn't say that if you lived in Kanvas, or the west coast of Ireland. I'm told that a few years ago somebody accidentally dumped a tr

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Steve D'Aprano
On Thu, 15 Sep 2016 03:43 am, Dale Marvin wrote: > On 9/14/16 12:20 AM, Steven D'Aprano wrote: >> On Wednesday 14 September 2016 16:54, Rustom Mody wrote: >> >>> everything we know will be negated in 5-50-500 years >> >> I'm pretty sure that in 5, 50, 500 or even 5000 years, the sun will still >>

Re: How could I implement a virtual method and override it in python?

2016-09-14 Thread wesley . keeling
On Wednesday, September 14, 2016 at 3:47:52 PM UTC-7, Lawrence D’Oliveiro wrote: > On Thursday, September 15, 2016 at 10:18:09 AM UTC+12, wesley@iugome.com > wrote: > > Helper.py: > > > > def Foo( *args ): > > print ("This is a callback") > > > > def Run: > > Foo() > > > > > > MyMo

Re: How could I implement a virtual method and override it in python?

2016-09-14 Thread Lawrence D’Oliveiro
On Thursday, September 15, 2016 at 10:18:09 AM UTC+12, wesley@iugome.com wrote: > Helper.py: > > def Foo( *args ): > print ("This is a callback") > > def Run: > Foo() > > > MyModule.py: > > import Helper > > def Foo( *args ): > print ("I want to be the new callback") Ove

Re: Expression can be simplified on list

2016-09-14 Thread Lawrence D’Oliveiro
On Thursday, September 15, 2016 at 9:12:25 AM UTC+12, Ned Batchelder wrote: > > On Wednesday, September 14, 2016 at 5:00:02 PM UTC-4, Lawrence D’Oliveiro > wrote: >> >> On Thursday, September 15, 2016 at 8:13:05 AM UTC+12, Terry Reedy wrote: >>> >>> Because True is the default, object need not and

How could I implement a virtual method and override it in python?

2016-09-14 Thread wesley . keeling
Hey guys, I will show the code first: Helper.py: def Foo( *args ): print ("This is a callback") def Run: Foo() MyModule.py: import Helper def Foo( *args ): print ("I want to be the new callback") I want to be able to call the Foo method in MyModule.py when it's there f

Re: What is the correct form for saying "licensed under the same terms as Python itself"?

2016-09-14 Thread Tim Chase
On 2016-09-14 11:57, Brendan Abel wrote: > Also, according to the python web site, they only accept > contributions under the following licenses: > >- Academic Free License v. 2.1 > >- Apache License, Version 2.0 >

Re: Expression can be simplified on list

2016-09-14 Thread Ned Batchelder
On Wednesday, September 14, 2016 at 5:00:02 PM UTC-4, Lawrence D’Oliveiro wrote: > On Thursday, September 15, 2016 at 8:13:05 AM UTC+12, Terry Reedy wrote: > > Because True is the default, object need not and at least in CPython > > does not have a __bool__ (or __len__) method. > > If they had to

Re: Expression can be simplified on list

2016-09-14 Thread Chris Angelico
On Thu, Sep 15, 2016 at 6:59 AM, Lawrence D’Oliveiro wrote: > On Thursday, September 15, 2016 at 8:13:05 AM UTC+12, Terry Reedy wrote: >> Because True is the default, object need not and at least in CPython >> does not have a __bool__ (or __len__) method. > > If they had to (in the absence of whic

Re: Expression can be simplified on list

2016-09-14 Thread Lawrence D’Oliveiro
On Thursday, September 15, 2016 at 8:13:05 AM UTC+12, Terry Reedy wrote: > Because True is the default, object need not and at least in CPython > does not have a __bool__ (or __len__) method. If they had to (in the absence of which a bool() cast would not work), then that would help prevent prob

Re: Expression can be simplified on list

2016-09-14 Thread Terry Reedy
On 9/14/2016 8:05 AM, Jussi Piitulainen wrote: Serhiy Storchaka writes: On 14.09.16 11:28, Steven D'Aprano wrote: I'm not sure if it makes sense to talk about an "empty regular expression", or if that is the same as re.compile(''). Presumably if such a thing makes sense, it would match nothi

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread breamoreboy
On Wednesday, September 14, 2016 at 9:00:04 PM UTC+1, MRAB wrote: > On 2016-09-14 18:43, Dale Marvin via Python-list wrote: > > On 9/14/16 12:20 AM, Steven D'Aprano wrote: > >> On Wednesday 14 September 2016 16:54, Rustom Mody wrote: > >> > >>> everything we know will be negated in 5-50-500 years >

Re: Why don't we call the for loop what it really is, a foreach loop?

2016-09-14 Thread breamoreboy
On Tuesday, September 13, 2016 at 9:57:38 PM UTC+1, Richard Grigonis wrote: > It would help newbies and prevent confusion. I entirely agree. All together now "foreach is a jolly good fellow...". Kindest regards. Mark Lawrence. -- https://mail.python.org/mailman/listinfo/python-list

Re: Expression can be simplified on list

2016-09-14 Thread Terry Reedy
On 9/14/2016 3:16 AM, Rustom Mody wrote: In THOSE TYPES that element can justifiably serve as a falsey (empty) type However to extrapolate from here and believe that ALL TYPES can have a falsey value meaningfully, especially in some obvious fashion, is mathematically nonsense. Python make no

Re: Requests for webbrowser module

2016-09-14 Thread John Gordon
In Jamie writes: > I am not sure if this is an intended consequence but when using the > webbrowser module to open a new blank browser tab in chrome it opens it > in a new browser window instead of using the current window. Providing There is an internal setting within Chrome that controls

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread MRAB
On 2016-09-14 18:43, Dale Marvin via Python-list wrote: On 9/14/16 12:20 AM, Steven D'Aprano wrote: On Wednesday 14 September 2016 16:54, Rustom Mody wrote: everything we know will be negated in 5-50-500 years I'm pretty sure that in 5, 50, 500 or even 5000 years, the sun will still rise in

Re: What is the correct form for saying "licensed under the same terms as Python itself"?

2016-09-14 Thread Brendan Abel
Unless you're actually distributing python (as in, the interpreter or it's source code), you don't need to include the python license or the copyright notice. You also don't need a Contributor agreement just to distribute a python library. That is more for people who are contributing to core Pyth

Re: Requests for webbrowser module

2016-09-14 Thread MRAB
On 2016-09-14 17:53, Jamie wrote: Hi, I am not sure if this is an intended consequence but when using the webbrowser module to open a new blank browser tab in chrome it opens it in a new browser window instead of using the current window. Providing any complete url provides different behaviour,

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Dale Marvin via Python-list
On 9/14/16 12:20 AM, Steven D'Aprano wrote: On Wednesday 14 September 2016 16:54, Rustom Mody wrote: everything we know will be negated in 5-50-500 years I'm pretty sure that in 5, 50, 500 or even 5000 years, the sun will still rise in the east, water will be wet, fire will burn, dogs will ha

Re: Expression can be simplified on list

2016-09-14 Thread Rustom Mody
On Wednesday, September 14, 2016 at 5:35:53 PM UTC+5:30, Jussi Piitulainen wrote: > Mathematical discussions tend to acknowledge only alternation (union), > concatenation and iteration (Kleene star) as operations, unless they > specifically focus on some other operations that can, in principle, be

Requests for webbrowser module

2016-09-14 Thread Jamie
Hi, I am not sure if this is an intended consequence but when using the webbrowser module to open a new blank browser tab in chrome it opens it in a new browser window instead of using the current window. Providing any complete url provides different behaviour, it opening a new tab in the cur

Re: Tkinter file dialog screwed

2016-09-14 Thread Kerbingamer376
On Wednesday, September 14, 2016 at 2:14:16 AM UTC+1, Steve D'Aprano wrote: > On Wed, 14 Sep 2016 06:08 am, kerbingamer376 wrote: > > > The tkinter file dialog is, for me, unusable. Whenever I try to use it, it > > opens, but all the text is white on a white background (see this > > http://xomf.co

[ANN] German translation of Python 3 Cheat Sheet

2016-09-14 Thread Laurent Pointal
Hello, The Python 3 Sheet Cheat (Mémento Bases Python 3) has been translated into german by StR Martin Putzlocher. Thanks to him. It can be downloaded on the same page as english and french versions: https://perso.limsi.fr/pointal/python:memento A+ L.Pointal. -- https://mail.python.org/mailman

What is the correct form for saying "licensed under the same terms as Python itself"?

2016-09-14 Thread Mark Summerfield
Hi, I'm developing a small Python software library that I want to publish as free software under the same terms as Python itself. I notice that a few of Python's own files begin like this: # Copyright 2007 XXX. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. Is this form

Re: [python-committers] [RELEASE] Python 3.6.0b1 is now available

2016-09-14 Thread Guido van Rossum
Fortunately that page isn't linked from anywhere on the home page AFAIK. If it is, could someone file an issue in the pydotorg tracker? The url is at the bottom of every page. On Wed, Sep 14, 2016 at 3:41 AM, Paul Moore wrote: > On 14 September 2016 at 11:32, Serhiy Storchaka wrote: >> On 13.09.

Re: Expression can be simplified on list

2016-09-14 Thread Jussi Piitulainen
Serhiy Storchaka writes: > On 14.09.16 11:28, Steven D'Aprano wrote: >> I'm not sure if it makes sense to talk about an "empty regular >> expression", or if that is the same as re.compile(''). Presumably if >> such a thing makes sense, it would match nothing, from any input at >> all. > > Actuall

Re: Expression can be simplified on list

2016-09-14 Thread Chris Angelico
On Wed, Sep 14, 2016 at 8:46 PM, Serhiy Storchaka wrote: > On 14.09.16 11:28, Steven D'Aprano wrote: >> >> I'm not sure if it makes sense to talk about an "empty regular >> expression", or >> if that is the same as re.compile(''). Presumably if such a thing makes >> sense, >> it would match nothin

Re: Expression can be simplified on list

2016-09-14 Thread Serhiy Storchaka
On 14.09.16 11:28, Steven D'Aprano wrote: I'm not sure if it makes sense to talk about an "empty regular expression", or if that is the same as re.compile(''). Presumably if such a thing makes sense, it would match nothing, from any input at all. Actually, it matches anything. re.compile('').ma

Re: [python-committers] [RELEASE] Python 3.6.0b1 is now available

2016-09-14 Thread Paul Moore
On 14 September 2016 at 11:32, Serhiy Storchaka wrote: > On 13.09.16 02:35, Ned Deily wrote: >> >> On behalf of the Python development community and the Python 3.6 release >> team, I'm happy to announce the availability of Python 3.6.0b1. 3.6.0b1 >> is the first of four planned beta releases of Py

Re: Python inner function parameter shadowed

2016-09-14 Thread Christopher Reimer
> On Sep 13, 2016, at 8:58 PM, Lawrence D’Oliveiro > wrote: > >> On Wednesday, September 14, 2016 at 4:34:34 AM UTC+12, Daiyue Weng wrote: >> PyCharm warns about "Shadows name 'func' from outer scope" > > Typical piece of software trying to be too helpful and just getting in the > way. > > Ca

‘pip2 install cryptography’ does not work

2016-09-14 Thread Cecil Westerhof
I try to do a: pip2 install cryptography But this give: gcc -pthread -shared build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o -L/usr/lib64 -lssl -lcrypto -lpython2.7 -o build/lib.linux-x86_64-2.7/cryptography/hazmat/bindings/_openssl.so /usr/lib64/gcc/x86_64-suse-l

%config PromptManager

2016-09-14 Thread Cecil Westerhof
In an ipy-file I have: %config PromptManager.in_template = r'[{time.strftime("%a, %d %b %T")} \u@\h:\Y1]\nIn [\#]: ' This works for ipython2, but gets ipython3 in an endless loop. At the moment I solved it with: if sys.version_info.major != 3: %config PromptManager.in_template = r'[{time.

Re: Expression can be simplified on list

2016-09-14 Thread Steven D'Aprano
On Wednesday 14 September 2016 17:16, Rustom Mody wrote: > On Wednesday, September 14, 2016 at 10:23:12 AM UTC+5:30, Steven D'Aprano > wrote: >> And if somebody designed an iterator that behaved badly or surprisingly, >> would you conclude that the entire concept of iteration is therefore broken?

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Lawrence D’Oliveiro
On Wednesday, September 14, 2016 at 6:54:39 PM UTC+12, Rustom Mody wrote: > Yet we remain cocksure of our assumtions inspite of the repeated data > that everything we know will be negated in 5-50-500 years Let’s see, 500 years ago, people knew * That the world is round, and how to measure its radi

Re: Python inner function parameter shadowed

2016-09-14 Thread Steven D'Aprano
On Wednesday 14 September 2016 13:58, Lawrence D’Oliveiro wrote: > On Wednesday, September 14, 2016 at 4:34:34 AM UTC+12, Daiyue Weng wrote: >> PyCharm warns about "Shadows name 'func' from outer scope" > > Typical piece of software trying to be too helpful and just getting in the > way. > > Can

Re: Expression can be simplified on list

2016-09-14 Thread Rustom Mody
On Wednesday, September 14, 2016 at 10:17:27 AM UTC+5:30, Steven D'Aprano wrote: > You're perfectly entitled to dislike duck-typed truthiness. But that makes > the > majority of dynamically-typed languages (like Python, Javascript, Ruby, Lua > and > more) a bad fit for your way of thinking. Ye

Re: Oh gods can we get any more off-topic *wink* [was Re: [Python-ideas] Inconsistencies]

2016-09-14 Thread Steven D'Aprano
On Wednesday 14 September 2016 16:54, Rustom Mody wrote: > everything we know will be negated in 5-50-500 years I'm pretty sure that in 5, 50, 500 or even 5000 years, the sun will still rise in the east, water will be wet, fire will burn, dogs will have mammary glands and frogs[1] won't, and t

Re: Expression can be simplified on list

2016-09-14 Thread Rustom Mody
On Wednesday, September 14, 2016 at 10:23:12 AM UTC+5:30, Steven D'Aprano wrote: > On Wednesday 14 September 2016 13:59, Lawrence D’Oliveiro wrote: > > > On Wednesday, September 14, 2016 at 2:25:48 PM UTC+12, Ben Finney wrote: > >> Lawrence D’Oliveiro writes: > >> > >> > It would be better if all