Re: Meaning of abbreviated terms

2018-05-12 Thread Ross Wilson
The "plist" abbreviation goes back to at least 1958 as it was used in the Lisp implementation [0].  And it may even predate Lisp.  I'm very sure that what actually went into a plist has often changed over the years, but the name persists. Lisp also used "association lists" [1] which were a key

Re: Meaning of abbreviated terms

2018-05-11 Thread Bob Martin
in 793617 20180511 072806 Steven D'Aprano wrote: >On Fri, 11 May 2018 07:20:36 +, Bob Martin wrote: > >> in 793605 20180511 044309 T Berger wrote: >>>On Saturday, May 5, 2018 at 6:45:46 PM UTC-4, MRAB wrote: On 2018-05-05 17:57, T Berger wrote: > What does the "p" in "plist" stand

Re: Meaning of abbreviated terms

2018-05-11 Thread Gregory Ewing
Steven D'Aprano wrote: But that's not where plists came from, was it? As I understand it, the plist data format was invented by Apple, and they called it a property list. The term "property list" can also refer to a data structure in Lisp: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node10

Re: Meaning of abbreviated terms

2018-05-10 Thread Steven D'Aprano
On Fri, 11 May 2018 07:20:36 +, Bob Martin wrote: > in 793605 20180511 044309 T Berger wrote: >>On Saturday, May 5, 2018 at 6:45:46 PM UTC-4, MRAB wrote: >>> On 2018-05-05 17:57, T Berger wrote: >>> > What does the "p" in "plist" stand for? Is there a python glossary >>> > that spells out the

Re: Meaning of abbreviated terms

2018-05-10 Thread Bob Martin
in 793605 20180511 044309 T Berger wrote: >On Saturday, May 5, 2018 at 6:45:46 PM UTC-4, MRAB wrote: >> On 2018-05-05 17:57, T Berger wrote: >> > What does the "p" in "plist" stand for? >> > Is there a python glossary that spells out the meanings of abbreviated >> > terms? >> > >> "plist" is "pro

Re: Meaning of abbreviated terms

2018-05-10 Thread T Berger
On Saturday, May 5, 2018 at 6:45:46 PM UTC-4, MRAB wrote: > On 2018-05-05 17:57, T Berger wrote: > > What does the "p" in "plist" stand for? > > Is there a python glossary that spells out the meanings of abbreviated > > terms? > > > "plist" is "property list". It's listed in the Python documentat

Re: Meaning of abbreviated terms

2018-05-05 Thread MRAB
On 2018-05-05 17:57, T Berger wrote: What does the "p" in "plist" stand for? Is there a python glossary that spells out the meanings of abbreviated terms? "plist" is "property list". It's listed in the Python documentation. -- https://mail.python.org/mailman/listinfo/python-list

Re: Meaning of "Add Python to environment variables"

2017-12-08 Thread Thomas Jollans
On 03/12/17 18:32, John Yeung wrote: > In the custom installation options for Python 3.6, what *exactly* does "Add Python to environment variables" mean? > > Which environment variables are we talking about? I imagine one of them would have to be PATH. Are there any others? If the note on the "Pr

Re: Meaning of "Add Python to environment variables"

2017-12-03 Thread Thomas Jollans
On 03/12/17 18:32, John Yeung wrote: > In the custom installation options for Python 3.6, what *exactly* does "Add > Python to environment variables" mean? > > Which environment variables are we talking about? I imagine one of them would > have to be PATH. Are there any others? If the note on

Re: meaning of [ ]

2017-09-04 Thread Steve D'Aprano
On Tue, 5 Sep 2017 03:37 am, Rustom Mody wrote: > My understanding is that the OP saw a 'for' inside a '[]' and wondered > "WTF is this?" Rustom, did you not notice that the OP seemed to understood the 'for' perfectly well, but asked what the meaning of the [ ] delimiters is? He explicitly says:

Re: meaning of [ ]

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 10:42:47 PM UTC+5:30, Rick Johnson wrote: > On Monday, September 4, 2017 at 9:27:23 AM UTC-5, Rustom Mody wrote: > > On Monday, September 4, 2017 at 6:36:11 PM UTC+5:30, Ben Bacarisse wrote: > > > Rustom Mody writes: > > > > > > > On Sunday, September 3, 2017 at 5:

Re: meaning of [ ]

2017-09-04 Thread Rick Johnson
On Monday, September 4, 2017 at 9:27:23 AM UTC-5, Rustom Mody wrote: > On Monday, September 4, 2017 at 6:36:11 PM UTC+5:30, Ben Bacarisse wrote: > > Rustom Mody writes: > > > > > On Sunday, September 3, 2017 at 5:10:13 PM UTC+5:30, Rick Johnson wrote: > > >> Andrej Viktorovich wrote: > > >> > I s

Re: meaning of [ ]

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 7:57:23 PM UTC+5:30, Rustom Mody wrote: > On Monday, September 4, 2017 at 6:36:11 PM UTC+5:30, Ben Bacarisse wrote: > > But [p for p in sys.path] is a list and "set-builder" notation is used > > for sets. Order is crucial for sys.path. You say exactly that below so

Re: meaning of [ ]

2017-09-04 Thread Rustom Mody
On Monday, September 4, 2017 at 6:36:11 PM UTC+5:30, Ben Bacarisse wrote: > Rustom Mody writes: > > > On Sunday, September 3, 2017 at 5:10:13 PM UTC+5:30, Rick Johnson wrote: > >> Andrej Viktorovich wrote: > >> > I suppose p becomes array of strings but what [] means in this statement? > >> > >>

Re: meaning of [ ]

2017-09-04 Thread Ben Bacarisse
Rustom Mody writes: > On Sunday, September 3, 2017 at 5:10:13 PM UTC+5:30, Rick Johnson wrote: >> Andrej Viktorovich wrote: >> > I suppose p becomes array of strings but what [] means in this statement? >> >> Generally, it's an inline form of writing a loop that returns a >> list. There are othe

Re: meaning of [ ]

2017-09-04 Thread Steve D'Aprano
On Mon, 4 Sep 2017 01:36 pm, Rustom Mody wrote: > Tsk tsk the confusioning continues Rustom, it is generally considered that we should do our best to *reduce* confusion, not increase it. *wink* > Rewrite > [p for p in sys.path] > as > [p | p ∈ sys.path] > > Is that clearer? No. What is "|" in

Re: meaning of [ ]

2017-09-03 Thread Rustom Mody
On Sunday, September 3, 2017 at 5:10:13 PM UTC+5:30, Rick Johnson wrote: > Andrej Viktorovich wrote: > > I suppose p becomes array of strings but what [] means in this statement? > > Generally, it's an inline form of writing a loop that returns a list. There > are other types as well. Tsk tsk th

Re: meaning of [ ]

2017-09-03 Thread Rick Johnson
Andrej Viktorovich wrote: > I suppose p becomes array of strings but what [] means in this statement? Generally, it's an inline form of writing a loop that returns a list. There are other types as well. https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions -- https://mail.p

Re: meaning of [ ]

2017-09-03 Thread Peter Otten
Andrej Viktorovich wrote: > Hello, > > Trying to understand command: > [p for p in sys.path] > > It prints array of paths. I suppose p becomes array of strings but what [] > means in this statement? This is called "list comprehension", and paths = [p for p in sys.path if "foo" in p] is roughl

Re: meaning of: line, =

2015-02-06 Thread Rustom Mody
On Friday, February 6, 2015 at 6:40:23 PM UTC+5:30, Devin Jeanpierre wrote: > Sorry for late reply, I somehow missed this email. > > On Thu, Feb 5, 2015 at 8:59 AM, Rustom Mody wrote: > > The reason I ask: I sorely miss haskell's pattern matching in python. > > > > It goes some way: > > > ((x

Re: meaning of: line, =

2015-02-06 Thread Rustom Mody
On Friday, February 6, 2015 at 6:40:23 PM UTC+5:30, Devin Jeanpierre wrote: > Sorry for late reply, I somehow missed this email. > > On Thu, Feb 5, 2015 at 8:59 AM, Rustom Mody wrote: > > The reason I ask: I sorely miss haskell's pattern matching in python. > > > > It goes some way: > > > ((x

Re: meaning of: line, =

2015-02-06 Thread Devin Jeanpierre
Sorry for late reply, I somehow missed this email. On Thu, Feb 5, 2015 at 8:59 AM, Rustom Mody wrote: > The reason I ask: I sorely miss haskell's pattern matching in python. > > It goes some way: > ((x,y),z) = ((1,2),3) x,y,z > (1, 2, 3) > > But not as far as I would like: > ((x,y)

Re: meaning of: line, =

2015-02-05 Thread Gregory Ewing
Chris Angelico wrote: [] = x # is equivalent to try: next(iter(x)) except StopIteration: pass else: raise ValueError("too many values to unpack (expected 0)") It's a way of asserting that an iterator is exhausted! But why disallow using () for the same thing? This is a blatant case of outright

Re: meaning of: line, =

2015-02-05 Thread Chris Angelico
On Fri, Feb 6, 2015 at 12:12 PM, Devin Jeanpierre wrote: > Here's another example, one that still exists in Python 3: > [] = '' () = '' > File "", line 1 > SyntaxError: can't assign to () > > The syntax explicitly blacklists (), but forgets to blacklist []. So... this is actually a re

Re: meaning of: line, =

2015-02-05 Thread Devin Jeanpierre
On Thu, Feb 5, 2015 at 8:08 AM, Ian Kelly wrote: > On Thu, Feb 5, 2015 at 2:40 AM, Steven D'Aprano > wrote: >> Devin Jeanpierre wrote: >>> On Wed, Feb 4, 2015 at 1:18 PM, Chris Angelico wrote: [result] = f() result > 42 Huh, was not aware of that alternate syntax.

Re: meaning of: line, =

2015-02-05 Thread Gregory Ewing
Devin Jeanpierre wrote: On Wed, Feb 4, 2015 at 1:18 PM, Chris Angelico wrote: On Thu, Feb 5, 2015 at 4:36 AM, Peter Otten <__pete...@web.de> wrote: [result] = f() result Huh, was not aware of that alternate syntax. Nor are most people. Nor is Python, in some places -- it seems like peop

Re: meaning of: line, =

2015-02-05 Thread Tim Chase
On 2015-02-05 09:08, Ian Kelly wrote: > > Got an example where you can use a,b but not [a,b] or (a,b)? > > >>> def f(a, (b, c)): > ... print a, b, c > ... Interesting. I knew that at one point you could do this with lambdas but never thought to do it with regular functions. There are ti

Re: meaning of: line, =

2015-02-05 Thread Rustom Mody
On Thursday, February 5, 2015 at 10:15:29 PM UTC+5:30, Rustom Mody wrote: > On Thursday, February 5, 2015 at 9:39:27 PM UTC+5:30, Ian wrote: > > On Thu, Feb 5, 2015 at 2:40 AM, Steven D'Aprano wrote: > > > Devin Jeanpierre wrote: > > > > > >> On Wed, Feb 4, 2015 at 1:18 PM, Chris Angelico wrote: >

Re: meaning of: line, =

2015-02-05 Thread Tim Chase
On 2015-02-05 08:45, Rustom Mody wrote: > > >>> def f(a, (b, c)): > > ... print a, b, c > > What the hell is that?! > First I am hearing/seeing it. > Whats it called? "tuple parameter unpacking", removed in Py3 https://www.python.org/dev/peps/pep-3113/ -tkc -- https://mail.python.org/ma

Re: meaning of: line, =

2015-02-05 Thread Skip Montanaro
Tuple packing. No longer supported in Python 3, but in available in Python <= 2. Skip On Thu, Feb 5, 2015 at 10:45 AM, Rustom Mody wrote: > On Thursday, February 5, 2015 at 9:39:27 PM UTC+5:30, Ian wrote: >> On Thu, Feb 5, 2015 at 2:40 AM, Steven D'Aprano wrote: >> > Devin Jeanpierre wrote: >>

Re: meaning of: line, =

2015-02-05 Thread Rustom Mody
On Thursday, February 5, 2015 at 9:39:27 PM UTC+5:30, Ian wrote: > On Thu, Feb 5, 2015 at 2:40 AM, Steven D'Aprano wrote: > > Devin Jeanpierre wrote: > > > >> On Wed, Feb 4, 2015 at 1:18 PM, Chris Angelico wrote: > >>> On Thu, Feb 5, 2015 at 4:36 AM, Peter Otten wrote: > Another alternative i

Re: meaning of: line, =

2015-02-05 Thread Ian Kelly
On Thu, Feb 5, 2015 at 2:40 AM, Steven D'Aprano wrote: > Devin Jeanpierre wrote: > >> On Wed, Feb 4, 2015 at 1:18 PM, Chris Angelico wrote: >>> On Thu, Feb 5, 2015 at 4:36 AM, Peter Otten <__pete...@web.de> wrote: Another alternative is to put a list literal on the lefthand side: >>

Re: meaning of: line, =

2015-02-05 Thread Steven D'Aprano
Devin Jeanpierre wrote: > On Wed, Feb 4, 2015 at 1:18 PM, Chris Angelico wrote: >> On Thu, Feb 5, 2015 at 4:36 AM, Peter Otten <__pete...@web.de> wrote: >>> Another alternative is to put a list literal on the lefthand side: >>> >> def f(): yield 42 >>> >>> ... >> [result] = f() >> res

Re: meaning of: line, =

2015-02-05 Thread Devin Jeanpierre
On Wed, Feb 4, 2015 at 1:18 PM, Chris Angelico wrote: > On Thu, Feb 5, 2015 at 4:36 AM, Peter Otten <__pete...@web.de> wrote: >> Another alternative is to put a list literal on the lefthand side: >> > def f(): yield 42 >> >> ... > [result] = f() > result >> 42 > > Huh, was not aware of

Re: meaning of: line, =

2015-02-05 Thread ast
"ast" a écrit dans le message de news:54d227ef$0$3292$426a7...@news.free.fr... thanks for the answers -- https://mail.python.org/mailman/listinfo/python-list

Re: meaning of: line, =

2015-02-04 Thread Chris Angelico
On Thu, Feb 5, 2015 at 4:36 AM, Peter Otten <__pete...@web.de> wrote: > Another alternative is to put a list literal on the lefthand side: > def f(): yield 42 > > ... [result] = f() result > 42 Huh, was not aware of that alternate syntax. > (If you're worried: neither the list nor

Re: meaning of: line, =

2015-02-04 Thread Peter Otten
Rustom Mody wrote: > Well its cryptic and confusing (to me at least) > And is helped by adding 2 characters: > > (result,) = f() > > instead of > > result, = f() Another alternative is to put a list literal on the lefthand side: >>> def f(): yield 42 ... >>> [result] = f() >>> result 42 (I

Re: meaning of: line, =

2015-02-04 Thread Ethan Furman
On 02/04/2015 07:04 AM, Chris Angelico wrote: > On Thu, Feb 5, 2015 at 1:38 AM, Albert-Jan Roskam wrote: >> I have also never seen this before, but perhaps this: >> > f = lambda: [42] > result, = f() > result >> 42 >> >> ... is slightly cleaner than this: > result = f()[0] > re

Re: meaning of: line, =

2015-02-04 Thread Rustom Mody
On Wednesday, February 4, 2015 at 8:14:29 PM UTC+5:30, Albert-Jan Roskam wrote: > - Original Message - > > > From: Chris Angelico > > Sent: Wednesday, February 4, 2015 3:24 PM > > Subject: Re: meaning of: line, = > > > > On Thu, Feb 5, 2015 at 1:08 AM

Re: meaning of: line, =

2015-02-04 Thread Chris Angelico
On Thu, Feb 5, 2015 at 1:38 AM, Albert-Jan Roskam wrote: > I have also never seen this before, but perhaps this: > f = lambda: [42] result, = f() result > 42 > > ... is slightly cleaner than this: result = f()[0] result > 42 They're not technically identical. If the thing

Re: meaning of: line, =

2015-02-04 Thread Albert-Jan Roskam
- Original Message - > From: Chris Angelico > To: > Cc: "python-list@python.org" > Sent: Wednesday, February 4, 2015 3:24 PM > Subject: Re: meaning of: line, = > > On Thu, Feb 5, 2015 at 1:08 AM, ast wrote: >> I dont understand why there is a c

Re: meaning of: line, =

2015-02-04 Thread Chris Angelico
On Thu, Feb 5, 2015 at 1:08 AM, ast wrote: > I dont understand why there is a comma just after line in the following > command: > > line, = plt.plot(x, np.sin(x), '--', linewidth=2) > > > I never saw that before > > Found here: > http://matplotlib.org/examples/lines_bars_and_markers/line_demo_dash

Re: meaning of: line, =

2015-02-04 Thread leo kirotawa
You'll find some explanation here: http://stackoverflow.com/questions/1708292/meaning-of-using-commas-and-underscores-with-python-assignment-operator On Wed, Feb 4, 2015 at 12:08 PM, ast wrote: > hello > > I dont understand why there is a comma just after line in the following > command: > > line

Re: Meaning of * in the function arguments list

2014-10-29 Thread Terry Reedy
On 10/29/2014 4:56 AM, ast wrote: Consider the following to_bytes method from integer class: int.to_bytes(length, byteorder, *, signed=False) What doest the '*' in the arguments list means ? If you go to the online doc index page for Symbols, https://docs.python.org/3/genindex-Symbols.html the

Re: Meaning of * in the function arguments list

2014-10-29 Thread ast
"Peter Otten" <__pete...@web.de> a écrit dans le message de news:mailman.15291.1414574006.18130.python-l...@python.org... A bare * indicates that the arguments that follow it are keyword-only: ok, thx -- https://mail.python.org/mailman/listinfo/python-list

Re: Meaning of * in the function arguments list

2014-10-29 Thread Peter Otten
ast wrote: > Consider the following to_bytes method from integer class: > > int.to_bytes(length, byteorder, *, signed=False) > > What doest the '*' in the arguments list means ? A bare * indicates that the arguments that follow it are keyword-only: >>> def f(a, b=2, *, c=3): ... print("a =

Re: Meaning of `\newline` as escape sequence

2012-12-28 Thread Chris Angelico
On Sat, Dec 29, 2012 at 2:42 AM, Marco wrote: > Hi all, in the documentation: > > http://docs.python.org/3.3/reference/lexical_analysis.html > > the escape sequence `\newline` is expained as "Backslash and newline > ignored". What does it mean? It means this: >>> foo = "This is\ one string." >>

Re: meaning of numpy.fft coefficients

2011-07-08 Thread Corey Richardson
Excerpts from Joey's message of Fri Jul 08 20:14:29 -0400 2011: > the list generated by numpy is of form [ a+bi, c+di, ...] > > could anybody tell me the meaning of the coefficients a and b? I am > very confused about fourier transform! > a+bi is a typical complex number. a is the real part, b i