[Python-Dev] 3.7.0b2 code cutoff soon!

2018-02-25 Thread Ned Deily
Just a reminder that 3.7.0b2 is almost upon us. Please get your feature fixes, bug fixes, and documentation updates in before 2018-02-26 ~23:59 Anywhere on Earth (UTC-12:00). That's a little over 1.5 days from now. Also, as previously noted, for those of you who asked for and received extensions fo

Re: [Python-Dev] [Python-checkins] Exhaustively test dataclass hashing when no hash= value is provided. This is in anticipation of changing how non-default hashing is handled. (GH-5834) (GH-5889)

2018-02-25 Thread Eric V. Smith
Thanks. Do you know if this gets backported to 3.7? Eric. On 2/25/2018 1:36 PM, Terry Reedy wrote: On 2/25/2018 11:56 AM, Eric V. Smith wrote: +    # specify any value in the deecorator). I fixed this through the web interface.  The CI now knows that a comment change does not need test

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-25 Thread Guido van Rossum
On Sun, Feb 25, 2018 at 6:36 AM, Serhiy Storchaka wrote: > 23.02.18 19:30, Guido van Rossum пише: > >> I'm not saying anything new here, but since you asked specifically for my >> opinion: I don't care for the idiom; it's never occurred to me before, and >> it smells of cleverness. If I saw it in

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-25 Thread Chris Angelico
On Mon, Feb 26, 2018 at 12:11 AM, Nikolaus Rath wrote: > On Feb 25 2018, Chris Angelico wrote: >> On Sun, Feb 25, 2018 at 11:02 PM, Nikolaus Rath wrote: >>> On Feb 22 2018, Serhiy Storchaka wrote: 1. Inner generator expression: result = [y + g(y) for y in (f(x) for x in range

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-25 Thread Serhiy Storchaka
23.02.18 19:30, Guido van Rossum пише: I'm not saying anything new here, but since you asked specifically for my opinion: I don't care for the idiom; it's never occurred to me before, and it smells of cleverness. If I saw it in a code review I would probably ask for a regular for-loop to make t

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-25 Thread Michel Desmoulin
Le 25/02/2018 à 14:11, Nikolaus Rath a écrit : > On Feb 25 2018, Chris Angelico wrote: >> On Sun, Feb 25, 2018 at 11:02 PM, Nikolaus Rath wrote: >>> On Feb 22 2018, Serhiy Storchaka wrote: 1. Inner generator expression: result = [y + g(y) for y in (f(x) for x in range(10))]

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-25 Thread Nikolaus Rath
On Feb 25 2018, Chris Angelico wrote: > On Sun, Feb 25, 2018 at 11:02 PM, Nikolaus Rath wrote: >> On Feb 22 2018, Serhiy Storchaka wrote: >>> 1. Inner generator expression: >>> >>> result = [y + g(y) for y in (f(x) for x in range(10))] >>> >> [...] >>> >>> And maybe there are other ways. >>

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-25 Thread Chris Angelico
On Sun, Feb 25, 2018 at 11:02 PM, Nikolaus Rath wrote: > On Feb 22 2018, Serhiy Storchaka wrote: >> 1. Inner generator expression: >> >> result = [y + g(y) for y in (f(x) for x in range(10))] >> > [...] >> >> And maybe there are other ways. > > I think the syntax recently brough up by Nick is

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-25 Thread Nikolaus Rath
On Feb 22 2018, Serhiy Storchaka wrote: > 1. Inner generator expression: > > result = [y + g(y) for y in (f(x) for x in range(10))] > [...] > > And maybe there are other ways. I think the syntax recently brough up by Nick is still the most beautiful: result = [ (f(x) as y) + g(y) for x i