On 18 June 2017 at 07:27, Mital Ashok via Python-ideas
wrote:
> Right now, an example for single dispatch would be:
>
> from functools import singledispatch
>
> @singledispatch
> def fun(arg, verbose=True):
> if verbose:
> print("Let me just say,", end=" ")
> print(arg)
>
> @fun.re
On 17/06/17 23:27, Mital Ashok via Python-ideas wrote:
> [snip]
> So I'm suggesting that @function.register for single dispatch
> functions returns the same function, so you would end up with
> something like:
>
> @singledispatch
> def fun(arg, verbose=True):
> if verbose:
> print("Let
Right now, an example for single dispatch would be:
from functools import singledispatch
@singledispatch
def fun(arg, verbose=True):
if verbose:
print("Let me just say,", end=" ")
print(arg)
@fun.register(int)
def _(arg, verbose=True):
if verbose:
print("Strength in n
On 17 June 2017 at 17:03, Sven R. Kunze wrote:
> If so, I don't know if it just complicates the language with a feature which
> does not save writing nor reading nor cpu cycles nor memory and which adds a
> functionality which is already there (but in reverse order).
>
> Maybe there are more benef
On Sat, Jun 17, 2017 at 09:03:54AM +0200, Sven R. Kunze wrote:
> On 17.06.2017 02:27, Steven D'Aprano wrote:
> >I think this is somewhat similar to a suggestion of Nick Coghlan's. One
> >possible syntax as a statement might be:
> >
> >y = b + 2 given:
> > b = a + 1
>
> Just to get this right:t
On 17.06.2017 02:27, Steven D'Aprano wrote:
I think this is somewhat similar to a suggestion of Nick Coghlan's. One
possible syntax as a statement might be:
y = b + 2 given:
b = a + 1
Just to get this right:this proposal is about reversing the order of
chaining expressions?
Instead of: