Re: A small quiz

2020-01-24 Thread boB Stepp
On Thu, Jan 23, 2020 at 2:57 AM Z wrote: > > what is PLR? Python Language Reference? https://docs.python.org/3/reference/index.html Or, perhaps, Python Library Reference? https://docs.python.org/3/library/index.html -- boB -- https://mail.python.org/mailman/listinfo/python-list

Re: A small quiz

2020-01-24 Thread Mario R. Osorio
On Thursday, January 23, 2020 at 3:54:56 AM UTC-5, Z wrote: > what is PLR? PLR: Private Label Rights (https://en.wikipedia.org/wiki/Private_label_rights) -- https://mail.python.org/mailman/listinfo/python-list

Re: A small quiz

2020-01-23 Thread Larry Martell
On Thu, Jan 23, 2020 at 3:56 AM Z wrote: > > what is PLR? Past Life Regression -- https://mail.python.org/mailman/listinfo/python-list

Re: A small quiz

2020-01-23 Thread DL Neil via Python-list
On 23/01/20 9:54 PM, Z wrote: what is PLR? Context? Trolling? What does this have to do with Python? https://duckduckgo.com/?q=meaning+plr=ffab=web -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: A small quiz

2020-01-23 Thread Z
what is PLR? -- https://mail.python.org/mailman/listinfo/python-list

Re: A small quiz

2020-01-04 Thread 황병희
Greg Ewing writes: > On 4/01/20 5:41 am, Alan Bawden wrote: >>>So I was looking for a predefined object from the standard >>>library that already /is/ an iterator (with no need to use >>>»iter«). > > Why are you so intent on introducing either next() or iter() to > beginning

Re: A small quiz

2020-01-03 Thread Greg Ewing
On 4/01/20 5:41 am, Alan Bawden wrote: So I was looking for a predefined object from the standard library that already /is/ an iterator (with no need to use »iter«). Why are you so intent on introducing either next() or iter() to beginning students? I'd have thought they were somewhat

Re: A small quiz

2020-01-03 Thread Peter Otten
Alan Bawden wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: > ... >> So I was looking for a predefined object from the standard >> library that already /is/ an iterator (with no need to use >> »iter«). >> >> I found exactly one such object (which can be used after a >> »from ...

Re: A small quiz

2020-01-03 Thread Alan Bawden
r...@zedat.fu-berlin.de (Stefan Ram) writes: ... > So I was looking for a predefined object from the standard > library that already /is/ an iterator (with no need to use > »iter«). > > I found exactly one such object (which can be used after a > »from ... import ...« statement). Can

Re: A small quiz question

2017-08-16 Thread Marko Rauhamaa
Dennis Lee Bieber : > I suppose, the two in combination imply that the calls to "f()" > occur first in left to right, but then the "**" are applied to the > returned values right to left -- rather than having the calls > performed in the exponentiation order. Yes,

Re: A small quiz question

2017-08-16 Thread Steve D'Aprano
On Thu, 17 Aug 2017 09:12 am, Dennis Lee Bieber wrote: > I suppose, the two in combination imply that the calls to "f()" occur > first in left to right, but then the "**" are applied to the returned > values right to left -- rather than having the calls performed in the > exponentiation order.

Re: A small quiz question

2017-08-16 Thread Ben Bacarisse
Steve D'Aprano writes: > On Wed, 16 Aug 2017 11:38 pm, Ben Bacarisse wrote: > >> r...@zedat.fu-berlin.de (Stefan Ram) writes: >> >>> I wrote my first Python quiz question! >>> >>> It goes like this: >>> >>> Can you predict (without trying it out) what the

Re: A small quiz question

2017-08-16 Thread Marko Rauhamaa
Ian Kelly : > On Wed, Aug 16, 2017 at 6:51 AM, Dennis Lee Bieber > wrote: >>>def f(i): print(i); return i; >>> >>>f(4)**f(1)**f(2) >>> >> >> As a first guess >> >> 2 >> 1 >> 4 >> >> 4 >> >> since in many languages, exponentiation associates

Re: A small quiz question

2017-08-16 Thread Ian Kelly
On Wed, Aug 16, 2017 at 6:51 AM, Dennis Lee Bieber wrote: > On 16 Aug 2017 11:06:26 GMT, r...@zedat.fu-berlin.de (Stefan Ram) declaimed > the following: > >> I wrote my first Python quiz question! >> >> It goes like this: >> >> Can you predict (without trying it out)

Re: A small quiz question

2017-08-16 Thread breamoreboy
On Wednesday, August 16, 2017 at 2:52:09 PM UTC+1, Steve D'Aprano wrote: > On Wed, 16 Aug 2017 10:29 pm, breamoreboy wrote: > > > How do you expect to get four lines of output from the three function calls? > > In the REPL (the interactive interpreter) the result of evaluating the line is >

Re: A small quiz question

2017-08-16 Thread breamoreboy
On Wednesday, August 16, 2017 at 12:45:13 PM UTC+1, Steve D'Aprano wrote: > On Wed, 16 Aug 2017 09:06 pm, Stefan Ram wrote: > > > I wrote my first Python quiz question! > > > > It goes like this: > > > > Can you predict (without trying it out) what the Python > > console will output

Re: A small quiz question

2017-08-16 Thread Steve D'Aprano
On Wed, 16 Aug 2017 11:38 pm, Ben Bacarisse wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: > >> I wrote my first Python quiz question! >> >> It goes like this: >> >> Can you predict (without trying it out) what the Python >> console will output after the following three lines have

Re: A small quiz question

2017-08-16 Thread Steve D'Aprano
On Wed, 16 Aug 2017 10:29 pm, breamore...@gmail.com wrote: > How do you expect to get four lines of output from the three function calls? In the REPL (the interactive interpreter) the result of evaluating the line is printed. -- Steve “Cheer up,” they said, “things could be worse.” So I

Re: A small quiz question

2017-08-16 Thread Ben Bacarisse
r...@zedat.fu-berlin.de (Stefan Ram) writes: > I wrote my first Python quiz question! > > It goes like this: > > Can you predict (without trying it out) what the Python > console will output after the following three lines have > been entered? > > def f(i): print(i); return i; > >

Re: A small quiz question

2017-08-16 Thread Steve D'Aprano
On Wed, 16 Aug 2017 09:06 pm, Stefan Ram wrote: > I wrote my first Python quiz question! > > It goes like this: > > Can you predict (without trying it out) what the Python > console will output after the following three lines have > been entered? > > def f(i): print(i); return i; >

Re: A small quiz question

2017-08-16 Thread Joel Goldstick
On Wed, Aug 16, 2017 at 7:06 AM, Stefan Ram wrote: > I wrote my first Python quiz question! > > It goes like this: > > Can you predict (without trying it out) what the Python > console will output after the following three lines have > been entered? > > def