Re: [Python-ideas] How do you think about these language extensions?

2017-08-19 Thread Steven D'Aprano
On Fri, Aug 18, 2017 at 10:33:40PM -0700, David Mertz wrote: > This is pretty easy to write without any syntax changes, just using a > higher-order function `compose()` (possible implementation at foot). > Again, I'll assume auto-currying like the map/filter versions of those > functions in toolz,

Re: [Python-ideas] How do you think about these language extensions?(Thautwarm)

2017-08-19 Thread ?? ?
Hi, all! I want to reply many people and it might annoy you if I write multiple replies... As a result, I write them all in one post. -- To Christopher Barker, Ph.D. -

Re: [Python-ideas] How do you think about these language extensions?

2017-08-19 Thread David Mertz
You are right, of course. Mine does the order wrong. But an 'rcompose()' or 'pipe()' or 'funchain()' is easy enough to put in the right order. On Aug 19, 2017 3:44 AM, "Steven D'Aprano" wrote: > On Fri, Aug 18, 2017 at 10:33:40PM -0700, David Mertz wrote: > > > This is pretty easy to write witho

Re: [Python-ideas] How do you think about these language extensions?

2017-08-19 Thread David Mertz
On Aug 19, 2017 3:44 AM, "Steven D'Aprano" wrote: 2) there's that unfortunate call to "compose" which isn't actually part of the algorithm, its just scaffolding to make it work; I see this as an ADVANTAGE, actually. We can save the composed function under another name before applying it to vari

Re: [Python-ideas] PEP 550 v2

2017-08-19 Thread Nathaniel Smith
On Sat, Aug 19, 2017 at 12:09 PM, Neil Girdhar wrote: > Cool to see this on python-ideas. I'm really looking forward to this PEP > 550 or 521. > > On Wednesday, August 16, 2017 at 3:19:29 AM UTC-4, Nathaniel Smith wrote: >> 2) For classic decimal.localcontext context managers, the idea is >> stil

Re: [Python-ideas] PEP 550 v2

2017-08-19 Thread Nathaniel Smith
On Fri, Aug 18, 2017 at 6:25 PM, Ethan Furman wrote: > On 08/17/2017 02:40 AM, Nick Coghlan wrote: >> >> On 17 August 2017 at 04:38, Yury Selivanov wrote: > > >> ck.get_value() attempts to look up the value for that key in the >> currently active execution context. >> If it doesn't find

Re: [Python-ideas] PEP 550 v2

2017-08-19 Thread Neil Girdhar
Cool to see this on python-ideas. I'm really looking forward to this PEP 550 or 521. On Wednesday, August 16, 2017 at 3:19:29 AM UTC-4, Nathaniel Smith wrote: > > On Tue, Aug 15, 2017 at 4:55 PM, Yury Selivanov > wrote: > > Hi, > > > > Here's the PEP 550 version 2. > > Awesome! > > Some of

Re: [Python-ideas] How do you think about these language extensions?

2017-08-19 Thread Steven D'Aprano
On Sat, Aug 19, 2017 at 09:05:36AM -0700, David Mertz wrote: > You are right, of course. Mine does the order wrong. But an 'rcompose()' or > 'pipe()' or 'funchain()' is easy enough to put in the right order. Indeed. I said earlier that your solution (corrected for its error) was a pretty neat s