Re: Boolean Expressions

2017-09-26 Thread Cameron Simpson
On 26Sep2017 20:55, Cai Gengyang wrote: On Wednesday, September 27, 2017 at 6:45:00 AM UTC+8, Cameron Simpson wrote: On 26Sep2017 14:43, Cai Gengyang wrote: >C) Set bool_three equal to the result of >19 % 4 != 300 / 10 / 10 and False > 19 % 4 = 3 which is equal to 300 / 10 / 10 = 3, hence the

Re: Aliasing [was Re: [Tutor] beginning to code]

2017-09-26 Thread Bill
Steve D'Aprano wrote: On Wed, 27 Sep 2017 02:03 am, Stefan Ram wrote: Steve D'Aprano writes: On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote: at that moment, but it still needed correction. If the assignment is an alias operator then after the statements Here's some C++ code that demonstr

Re: Boolean Expressions

2017-09-26 Thread Gregory Ewing
Cai Gengyang wrote: So does that mean that the way 'and' works in Python is that both terms must be True (1) for the entire expression to be True ? Why is it defined that way, weird ? It's not weird, it's the normal meaning of "and" in English. Do I have purple hair? No. Do I have three nostri

Re: Parentheses (as after "print")

2017-09-26 Thread Ben Finney
r...@zedat.fu-berlin.de (Stefan Ram) writes: > But it's a pattern when it means to strip the language > of useless boilerplate and still following consistent > and simple rules. That was what made Python great. Yes. Python syntax allows for *mentioning* an object, and also allows for *calli

Re: Parentheses (as after "print")

2017-09-26 Thread Ben Finney
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Why do we newbies write »print 2«? Here's another hint. > This is an original transcript of what happened to me today: […] > What happened? I woke up today in parens mood. So I typed: > > import( operator ) So, are you making the case that peo

Re: Boolean Expressions

2017-09-26 Thread Cai Gengyang
On Wednesday, September 27, 2017 at 6:45:00 AM UTC+8, Cameron Simpson wrote: > On 26Sep2017 14:43, Cai Gengyang wrote: > >Help check if my logic is correct in all 5 expressions > > Why not just run some code interactively? Unless this is entirely a thought > exercise to verify that you have a so

Re: Parentheses (as after "print")

2017-09-26 Thread MRAB
On 2017-09-27 03:48, Stefan Ram wrote: Steve D'Aprano writes: "Do What I Mean" (DWIM) programming is a terrible idea. It's an anti-pattern, when one expects the implementation to follow different and contradicting rules and then somehow guess what was in the mind of the programmer.

Re: Aliasing [was Re: [Tutor] beginning to code]

2017-09-26 Thread Steve D'Aprano
On Wed, 27 Sep 2017 02:03 am, Stefan Ram wrote: > Steve D'Aprano writes: >>On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote: >>>at that moment, but it still needed correction. If the assignment is >>>an alias operator then after the statements >>Here's some C++ code that demonstrates it. Apologi

Re: Boolean Expressions

2017-09-26 Thread Steve D'Aprano
On Wed, 27 Sep 2017 08:23 am, Cai Gengyang wrote: > > I'm trying to understand the logic behind AND. I looked up Python logic tables > > False and False gives False > False and True gives False > True and False gives False > True and True gives True. > > So does that mean that the way 'and' wor

Re: Boolean Expressions

2017-09-26 Thread Thomas Jollans
On 27/09/17 00:23, Cai Gengyang wrote: > I'm trying to understand the logic behind AND. I looked up Python logic tables > > False and False gives False > False and True gives False > True and False gives False > True and True gives True. > > So does that mean that the way 'and' works in Python is t

Re: Parentheses (as after "print")

2017-09-26 Thread Steve D'Aprano
On Wed, 27 Sep 2017 06:00 am, Stefan Ram wrote: > Python could have taken the indentation of the > next line to tell that this is supposed to be > a function definition and not a function call. "Do What I Mean" (DWIM) programming is a terrible idea. -- Steve “Cheer up,” they said, “things cou

Re: Boolean Expressions

2017-09-26 Thread Irv Kalb
> > On Sep 26, 2017, at 3:23 PM, Cai Gengyang wrote: > > > I'm trying to understand the logic behind AND. I looked up Python logic tables > > False and False gives False > False and True gives False > True and False gives False > True and True gives True. > > So does that mean that the way 'a

Re: Boolean Expressions

2017-09-26 Thread Irmen de Jong
On 09/27/2017 12:23 AM, Cai Gengyang wrote: > > I'm trying to understand the logic behind AND. I looked up Python logic tables > > False and False gives False > False and True gives False > True and False gives False > True and True gives True. > > So does that mean that the way 'and' works in P

Re: auto installing dependencies with pip to run a python zip application ?

2017-09-26 Thread Irmen de Jong
On 09/26/2017 10:49 PM, Paul Moore wrote: > On 26 September 2017 at 19:47, Irmen de Jong wrote: >> Any thoughts on this? Is it a good idea or something horrible? Has >> someone attempted something like this before perhaps? > > When I've done this, I've bundled my dependencies in with my zipapp. >

Re: Boolean Expressions

2017-09-26 Thread Cameron Simpson
On 26Sep2017 15:23, Cai Gengyang wrote: I'm trying to understand the logic behind AND. I looked up Python logic tables False and False gives False False and True gives False True and False gives False True and True gives True. So does that mean that the way 'and' works in Python is that both

Re: Boolean Expressions

2017-09-26 Thread Cameron Simpson
On 26Sep2017 14:43, Cai Gengyang wrote: Help check if my logic is correct in all 5 expressions Why not just run some code interactively? Unless this is entirely a thought exercise to verify that you have a solid mental understanding of Python semantics, all your reasoning is easy to test.

Re: Boolean Expressions

2017-09-26 Thread Rob Gaddi
On 09/26/2017 03:23 PM, Cai Gengyang wrote: I'm trying to understand the logic behind AND. I looked up Python logic tables False and False gives False False and True gives False True and False gives False True and True gives True. So does that mean that the way 'and' works in Python is that bo

Re: Boolean Expressions

2017-09-26 Thread Cai Gengyang
I'm trying to understand the logic behind AND. I looked up Python logic tables False and False gives False False and True gives False True and False gives False True and True gives True. So does that mean that the way 'and' works in Python is that both terms must be True (1) for the entire expr

Re: Boolean Expressions

2017-09-26 Thread sohcahtoa82
On Tuesday, September 26, 2017 at 2:54:32 PM UTC-7, Chris Angelico wrote: > On Wed, Sep 27, 2017 at 7:43 AM, Cai Gengyang wrote: > > Help check if my logic is correct in all 5 expressions > > > > > > A) Set bool_one equal to the result of > > False and False > > > > Entire Expression : False and F

Re: Aliasing [was Re: [Tutor] beginning to code]

2017-09-26 Thread ROGER GRAYDON CHRISTMAN
On Tue, Sep 26, 2017 12:00 PM, Steve D'Aprano wrote: > > a = 1 >> b = a >> b = 2 >> >> a is not 2. > < snip > int main () { > int a; > int& b = a; // reference variable or alias > > a = 1; > printf("a: %d, alias b: %d\n", a, b); > b = 2; > printf("a: %d, alias b: %d\n", a, b); > r

Re: Boolean Expressions

2017-09-26 Thread Chris Angelico
On Wed, Sep 27, 2017 at 7:43 AM, Cai Gengyang wrote: > Help check if my logic is correct in all 5 expressions > > > A) Set bool_one equal to the result of > False and False > > Entire Expression : False and False gives True because both are False This is not correct, and comes from a confusion in

Boolean Expressions

2017-09-26 Thread Cai Gengyang
Help check if my logic is correct in all 5 expressions A) Set bool_one equal to the result of False and False Entire Expression : False and False gives True because both are False B) Set bool_two equal to the result of -(-(-(-2))) == -2 and 4 >= 16 ** 0.5 -(-(-(-2))) is equal to 2, and 2 i

Re: auto installing dependencies with pip to run a python zip application ?

2017-09-26 Thread Paul Moore
On 26 September 2017 at 19:47, Irmen de Jong wrote: > Any thoughts on this? Is it a good idea or something horrible? Has > someone attempted something like this before perhaps? When I've done this, I've bundled my dependencies in with my zipapp. Of course that's trickier if you have binary depend

Re: Parentheses (as after "print")

2017-09-26 Thread Chris Angelico
On Wed, Sep 27, 2017 at 6:00 AM, Stefan Ram wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: >>Stefan Behnel writes: >>>But would you also write this? > ... >>>def(func(a,b,c)): >>>return(a+b+c) >>No, this not. > > What I wrote was like: > > func( a, b, c ) > return a+b+c >

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-26 Thread Marko Rauhamaa
Rhodri James : > On 25/09/17 20:40, Marko Rauhamaa wrote: >> A pointer is something that points to a data object. > > In that case you are using "pointer" in such an informal sense that > making deductions from it is unlikely to be successful. Propose a name for the concept. Candidates so far: "p

Re: auto installing dependencies with pip to run a python zip application ?

2017-09-26 Thread Irmen de Jong
On 09/26/2017 09:19 PM, Thomas Jollans wrote: >> - use venv.EnvBuilder() to create a new virtualenv somewhere in the >> user's home directory (~./virtualenvs/mygreatgame ?) > > The appropriate place for this kind of thing, on Linux, would be > $XDG_DATA_HOME, default "~/.local/share/", i.e.: > >

Re: Grumpy-pants spoil-sport [was Re: [Tutor] beginning to code]

2017-09-26 Thread Chris Angelico
On Wed, Sep 27, 2017 at 5:24 AM, Grant Edwards wrote: > On 2017-09-26, alister via Python-list wrote: >> On Tue, 26 Sep 2017 14:16:47 +, Grant Edwards wrote: >> >>> On 2017-09-26, Ned Batchelder wrote: On 9/25/17 10:20 PM, Steve D'Aprano wrote: > On Tue, 26 Sep 2017 02:54 am, Ned Ba

Re: Parentheses (as after "print")

2017-09-26 Thread Chris Angelico
On Wed, Sep 27, 2017 at 5:19 AM, Stefan Behnel wrote: > print() and help() are definitely not worth being keywords. They do not > impact the program flow, they don't do any assignments, nothing. That's why > they are simple functions. If anything, help() could benefit more from language support t

Re: Grumpy-pants spoil-sport [was Re: [Tutor] beginning to code]

2017-09-26 Thread Grant Edwards
On 2017-09-26, alister via Python-list wrote: > On Tue, 26 Sep 2017 14:16:47 +, Grant Edwards wrote: > >> On 2017-09-26, Ned Batchelder wrote: >>> On 9/25/17 10:20 PM, Steve D'Aprano wrote: On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote: [...] >>> We've been asked

Re: Parentheses (as after "print")

2017-09-26 Thread Stephan Houben
Op 2017-09-26, Stefan Ram schreef : > What happened? I woke up today in parens mood. So I typed: > > import( operator ) > > Python told me that I should type: > > import operator > > . Fine, Python conditioned me to omit the parens. > So now I was in noparens mood. So I typed: > > help ope

Re: auto installing dependencies with pip to run a python zip application ?

2017-09-26 Thread Thomas Jollans
On 26/09/17 20:47, Irmen de Jong wrote: > Hi, > I've been using Python's executable zip application feature to neatly > package my little game into a single "executable" file. > Here "executable" means the user can simply start it by doubleclicking > it, or launching it from a shell prompt. Of cour

Re: Parentheses (as after "print")

2017-09-26 Thread Stefan Behnel
Stefan Ram schrieb am 26.09.2017 um 17:56: > Why do we newbies write »print 2«? Here's another hint. > This is an original transcript of what happened to me today: > > |>>> import( operator ) > | File "", line 1 > |import( operator ) > | ^ > |SyntaxError: invalid syntax > | > |>>

Re: Calling methods without objects?

2017-09-26 Thread Stephan Houben
Op 2017-09-25, Stefan Ram schreef : > So, is there some mechanism in Python that can bind a method > to an object so that the caller does not have to specify the > object in the call? > > If so, how is this mechanism called? > Others have already explained the details how functions become

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread Bernie Connors
On Tuesday, September 26, 2017 at 12:32:18 PM UTC-3, Bernie Connors wrote: > Hello, > > My first post here on C.L.P. I have only written a few python scripts > in 2.7 and now I'm trying my first python 3 script. Can you tell me why this > snippet won't run? > --- > fr

auto installing dependencies with pip to run a python zip application ?

2017-09-26 Thread Irmen de Jong
Hi, I've been using Python's executable zip application feature to neatly package my little game into a single "executable" file. Here "executable" means the user can simply start it by doubleclicking it, or launching it from a shell prompt. Of course the user already has to have a proper Python in

Re: Grumpy-pants spoil-sport [was Re: [Tutor] beginning to code]

2017-09-26 Thread Tim Chase
On 2017-09-26 18:25, alister via Python-list wrote: >>> We've been asked nicely by the list mod to stop :) >> >> Perhaps we could agree on a subject line tag to be used in all >> threas arguing about what to call the Python argument passing >> scheme? That way the other 99% of us could pre-empt

Re: Grumpy-pants spoil-sport [was Re: [Tutor] beginning to code]

2017-09-26 Thread Chris Angelico
On Wed, Sep 27, 2017 at 4:25 AM, alister via Python-list wrote: > On Tue, 26 Sep 2017 14:16:47 +, Grant Edwards wrote: > >> On 2017-09-26, Ned Batchelder wrote: >>> On 9/25/17 10:20 PM, Steve D'Aprano wrote: On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote: [...] >>

Re: Grumpy-pants spoil-sport [was Re: [Tutor] beginning to code]

2017-09-26 Thread alister via Python-list
On Tue, 26 Sep 2017 14:16:47 +, Grant Edwards wrote: > On 2017-09-26, Ned Batchelder wrote: >> On 9/25/17 10:20 PM, Steve D'Aprano wrote: >>> On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote: >>> [...] >>> >>> >>> >> We've been asked nicely by the list mod to stop :) > > Perhaps we could a

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread Peter Otten
Bernie Connors wrote: > On Tuesday, September 26, 2017 at 12:32:18 PM UTC-3, Bernie Connors wrote: >> Hello, >> >> My first post here on C.L.P. I have only written a few python >> scripts in 2.7 and now I'm trying my first python 3 script. Can >> you tell me why this snippet w

Re: Finding keyword arguments in the documentation

2017-09-26 Thread Peter Otten
Jerry Hill wrote: > On Tue, Sep 26, 2017 at 12:32 PM, Peter Otten <__pete...@web.de> wrote: >> Newer Python versions will show >> >> Help on built-in function sin in module math: >> >> sin(x, /) >> Return the sine of x (measured in radians). >> >> >> where the arguments before the slash are po

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread Bernie Connors
On Tuesday, September 26, 2017 at 12:32:18 PM UTC-3, Bernie Connors wrote: > Hello, > > My first post here on C.L.P. I have only written a few python scripts > in 2.7 and now I'm trying my first python 3 script. Can you tell me why this > snippet won't run? > --- > fr

Re: Finding keyword arguments in the documentation

2017-09-26 Thread Jerry Hill
On Tue, Sep 26, 2017 at 12:32 PM, Peter Otten <__pete...@web.de> wrote: > Newer Python versions will show > > Help on built-in function sin in module math: > > sin(x, /) > Return the sine of x (measured in radians). > > > where the arguments before the slash are positional-only: What version o

Re: Finding keyword arguments in the documentation

2017-09-26 Thread Peter Otten
Stefan Ram wrote: > Here's a console transcript: > > |>>> from math import sin > |>>> help( sin ) > |Help on built-in function sin in module math: > | > |sin(...) > |sin(x) > | > |Return the sine of x (measured in radians). > | > |>>> sin( x = 2.0 ) > |Traceback (most recent call last):

Re: Aliasing [was Re: [Tutor] beginning to code]

2017-09-26 Thread Antoon Pardon
On 26-09-17 14:28, Steve D'Aprano wrote: > On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote: > >> Sorry, what he wrote contradicts that. Maybe he was just really confused >> at that moment, but it still needed correction. If the assignment is >> an alias operator then after the statements >> >> a

Re: Grumpy-pants spoil-sport [was Re: [Tutor] beginning to code]

2017-09-26 Thread Tim Golden
On 26/09/2017 15:16, Grant Edwards wrote: On 2017-09-26, Ned Batchelder wrote: On 9/25/17 10:20 PM, Steve D'Aprano wrote: On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote: [...] We've been asked nicely by the list mod to stop :) Perhaps we could agree on a subject line tag to be used i

Re: PyQt: Parenting a Widget

2017-09-26 Thread Thomas Jollans
On 2017-09-26 16:41, Veek M wrote: > Thanks - i'm on debian stretch so python 2.7 is what I use. https://packages.debian.org/stretch/python3 https://packages.debian.org/stretch/python3-pyqt4 https://packages.debian.org/stretch/python3-pyqt5 -- https://mail.python.org/mailman/listinfo/python-li

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread MRAB
On 2017-09-26 16:31, berniejconn...@gmail.com wrote: Hello, My first post here on C.L.P. I have only written a few python scripts in 2.7 and now I'm trying my first python 3 script. Can you tell me why this snippet won't run? --- from urllib.request import urlopen

Re: Newbie problem with urllib.request.urlopen

2017-09-26 Thread Thomas Jollans
On 2017-09-26 17:31, berniejconn...@gmail.com wrote: > Hello, > > My first post here on C.L.P. I have only written a few python scripts > in 2.7 and now I'm trying my first python 3 script. Can you tell me why this > snippet won't run? What do you mean, "won't run"? Is there an error me

Newbie problem with urllib.request.urlopen

2017-09-26 Thread berniejconnors
Hello, My first post here on C.L.P. I have only written a few python scripts in 2.7 and now I'm trying my first python 3 script. Can you tell me why this snippet won't run? --- from urllib.request import urlopen with urlopen('http://geonb.snb.ca/arcgis/rest/services

ANN: Python Meeting Düsseldorf - 27.09.2017

2017-09-26 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group meeting in Düsseldorf, Germany] ANKÜNDIGUNG Python Meeting Düsseldorf http://pyddf.de/ Ein Tref

Re: PyQt: Parenting a Widget

2017-09-26 Thread Chris Angelico
On Wed, Sep 27, 2017 at 12:41 AM, Veek M wrote: > Thanks - i'm on debian stretch so python 2.7 is what I use. Debian Stretch ships with Python 3.5 too. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: PyQt: Parenting a Widget

2017-09-26 Thread Veek M
On Tuesday, September 26, 2017 at 2:23:22 PM UTC+5:30, Thomas Jollans wrote: > On 2017-09-26 08:16, Veek M wrote: > > On Tuesday, September 26, 2017 at 11:18:54 AM UTC+5:30, Veek M wrote: > >> Summary: Could someone explain widget and dialog parenting - the text book > >> is not making sense. > >>

Re: Grumpy-pants spoil-sport [was Re: [Tutor] beginning to code]

2017-09-26 Thread Grant Edwards
On 2017-09-26, Ned Batchelder wrote: > On 9/25/17 10:20 PM, Steve D'Aprano wrote: >> On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote: >> [...] >> >> > > We've been asked nicely by the list mod to stop :) Perhaps we could agree on a subject line tag to be used in all threas arguing about what t

Re: Python scripting as side job

2017-09-26 Thread Neil Cerutti
On 2017-09-26, Chris Angelico wrote: > On Tue, Sep 26, 2017 at 10:51 PM, gvim wrote: >> Has anyone had any success using Python scripting to automate >> processes for small businesses as a side job? I'd like to use >> my Python skills to supplement my income with about 4 hours' >> work a week. >

Re: TypeError with map with no len()

2017-09-26 Thread john polo
On 9/25/2017 5:37 PM, Thomas Jollans wrote: On 25/09/17 18:44, john polo wrote: Python List, I am trying to make practice data for plotting purposes. I am using Python 3.6. The instructions I have are import matplotlib.pyplot as plt import math import numpy as np t = np.arange(0, 2.5, 0.1) y1

Re: Python scripting as side job

2017-09-26 Thread Chris Angelico
On Tue, Sep 26, 2017 at 10:51 PM, gvim wrote: > Has anyone had any success using Python scripting to automate processes for > small businesses as a side job? I'd like to use my Python skills to > supplement my income with about 4 hours' work a week. Python scripting for automation is definitely a

Python scripting as side job

2017-09-26 Thread gvim
Has anyone had any success using Python scripting to automate processes for small businesses as a side job? I'd like to use my Python skills to supplement my income with about 4 hours' work a week. gvim -- https://mail.python.org/mailman/listinfo/python-list

Aliasing [was Re: [Tutor] beginning to code]

2017-09-26 Thread Steve D'Aprano
On Tue, 26 Sep 2017 03:26 am, Antoon Pardon wrote: >>> I'm not sure that Steve knows how it works. When he denies that the >>> assignment is an alias operation in Python that casts an important doubt. >> >> I can assure you that Steve knows how it works. Again, the disagreement is >> almost certa

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-26 Thread Rhodri James
On 25/09/17 21:00, Tim Golden wrote: (Slight sigh). Can I step in as a list owner and ask the people who are so very fond of debating this topic again and again: please let it drop. But, but... someone on the internet is wrong! https://www.facebook.com/playingrapunzel/videos/10153716804864491/

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-26 Thread Rhodri James
On 25/09/17 20:40, Marko Rauhamaa wrote: Rhodri James : On 25/09/17 15:26, Marko Rauhamaa wrote: That's not what I said. I said all expressions *evaluate to* pointers. This may well be true in particular implementations, but it is an implementation detail so Chris' point still stands. Anothe

Re: Grumpy-pants spoil-sport

2017-09-26 Thread Marko Rauhamaa
Antoon Pardon : > Op 26-09-17 om 12:09 schreef Marko Rauhamaa: >> I don't think the clear description of Python's semantics requires the >> use of such terms ("alias", "call by XXX"). It would be enough to >> specify what actually happens. > > I agree, but the fact that one doesn't require a parti

Re: Grumpy-pants spoil-sport

2017-09-26 Thread Antoon Pardon
Op 26-09-17 om 12:09 schreef Marko Rauhamaa: > Antoon Pardon : > >> That wont happen as long as people continue to do damage with e.g. >> claiming that the python assignment is not an alias operation. >> >> There is IMO no conceptual damage by regarding the call semantics >> as call by reference. >

Re: Grumpy-pants spoil-sport

2017-09-26 Thread Marko Rauhamaa
Antoon Pardon : > That wont happen as long as people continue to do damage with e.g. > claiming that the python assignment is not an alias operation. > > There is IMO no conceptual damage by regarding the call semantics > as call by reference. I don't think the clear description of Python's seman

Re: Grumpy-pants spoil-sport

2017-09-26 Thread Antoon Pardon
Op 26-09-17 om 11:13 schreef Ben Finney: > Steve D'Aprano writes: > >> On Mon, 25 Sep 2017 10:53 pm, Ned Batchelder wrote: >> >>> Would we be able to end these interminable debates if we just agree >>> that we all know how it works, >> If only that were true. Not everyone understands Python semant

Re: Running a GUI program haults the calling program (linux)

2017-09-26 Thread Cameron Simpson
On 26Sep2017 04:48, Kryptxy wrote: Here - p = subprocess.Popen(["transmission-gtk", link], stdout=subprocess.PIPE, stderr=subprocess.PIPE) output, error = p.communicate() Peter> That"s the problem. communicate() *must* block to collect the program"s Peter> entire output. You get what you ask

Re: Grumpy-pants spoil-sport

2017-09-26 Thread Marko Rauhamaa
Ben Finney : > No, we cannot just agree that we all know how it works. The well is > poisoned for a long time, and we must diligently undo the conceptual > damage for generations to come; and I know of no better way than > continuing to publicly discuss how both misapprehensions are wrong. For st

Re: Grumpy-pants spoil-sport

2017-09-26 Thread Ben Finney
Steve D'Aprano writes: > On Mon, 25 Sep 2017 10:53 pm, Ned Batchelder wrote: > > > Would we be able to end these interminable debates if we just agree > > that we all know how it works, > > If only that were true. Not everyone understands Python semantics (or > for that matter, Java/Swift/languag

Re: PyQt: Parenting a Widget

2017-09-26 Thread Thomas Jollans
On 2017-09-26 08:16, Veek M wrote: > On Tuesday, September 26, 2017 at 11:18:54 AM UTC+5:30, Veek M wrote: >> Summary: Could someone explain widget and dialog parenting - the text book >> is not making sense. >> ## >> I'm trying to understand widget parenting, from the book: Ra

Re: Running a GUI program haults the calling program (linux)

2017-09-26 Thread Kryptxy via Python-list
> Original Message > Subject: Re: Running a GUI program haults the calling program (linux) > Local Time: 26 September 2017 1:26 PM > UTC Time: 26 September 2017 07:56 > From: __pete...@web.de > To: python-list@python.org > > Kryptxy via Python-list wrote: > >> Sent with [ProtonMai

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-26 Thread Marko Rauhamaa
Chris Angelico : > I've explained Python's (or JavaScript's, since they're the same) > object model to a number of novice programmers without any > difficulties, without talking about pointers or invisible values or > any of that junk. There are just two things to explain: the concept of > names r

Re: Change project licence?

2017-09-26 Thread Ben Finney
Kryptxy via Python-list writes: > Yep. I will wait for a response. Thank you! There remains, of course, the option to keep developing and distributing the work under GNU GPL. As Chris points out, the GNU GPL terms are plenty permissive enough and keep the playing field guaranteed level for all.

Re: Running a GUI program haults the calling program (linux)

2017-09-26 Thread Peter Otten
Kryptxy via Python-list wrote: > Sent with [ProtonMail](https://protonmail.com) Secure Email. > >> Original Message >> Subject: Re: Running a GUI program haults the calling program (linux) >> Local Time: 26 September 2017 12:09 PM >> UTC Time: 26 September 2017 06:39 >> From: c.

Re: Running a GUI program haults the calling program (linux)

2017-09-26 Thread Cameron Simpson
On 25Sep2017 20:38, Kryptxy wrote: I want to run a GUI program (transmission-gtk) from python. This is what I do: import subprocess subprocess.Popen(['transmission-gtk', link], stdout=subprocess.PIPE, stderr=subprocess.PIPE) Where `link` is some magnetic link. This command opens transmission

Re: Printing a Chunk Of Words

2017-09-26 Thread Gregory Ewing
Ben Bacarisse wrote: Think functional! This is 257 characters: 250 chars, 17 shorter than the text it produces: a=[];o=[];n=[];A=list.append for b in range(3,-1,-1): x=bool(b>>1);y=bool(b&1);A(a,"%s and %s is %s"%(x,y,x and y));A(o,"%s or %s is %s"%(x,y,x or y)) if x:A(n,"not %s is %s"%(y

Re: Running a GUI program haults the calling program (linux)

2017-09-26 Thread Kryptxy via Python-list
Sent with [ProtonMail](https://protonmail.com) Secure Email. > Original Message > Subject: Re: Running a GUI program haults the calling program (linux) > Local Time: 26 September 2017 12:09 PM > UTC Time: 26 September 2017 06:39 > From: c...@cskk.id.au > To: Kryptxy > python-lis

Re: Running a GUI program haults the calling program (linux)

2017-09-26 Thread Kryptxy via Python-list
Sent with [ProtonMail](https://protonmail.com) Secure Email. > Original Message > Subject: Re: Running a GUI program haults the calling program (linux) > Local Time: 26 September 2017 6:20 AM > UTC Time: 26 September 2017 00:50 > From: ros...@gmail.com > To: python-list > > On T

Re: [Tutor] beginning to code

2017-09-26 Thread Antoon Pardon
Op 25-09-17 om 21:44 schreef Ned Batchelder: > > Wikipedia has the right definition of call by reference > (https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference): > >    /Call by reference/ (also referred to as /pass by reference/) is an >    evaluation strategy where a function rece