<p dir="ltr"><br>
> On Thu, May 7, 2015 at 7:09 PM, Jo?o Santos <<a href="mailto:jmcs@jsantos.eu">jmcs@jsantos.eu</a>> wrote:<br>
> > On Wed, 6 May 2015 at 16:51 Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br>
> >><br>
> >><br>
> >> I think that there are some questions that would need to be answered.<br>
> >> For instance, given some composition:<br>
> >><br>
> >> f = math.sin @ (lambda x: x**2)<br>
> >><br>
> >> what would f.__name__ return? What about str(f)?<br>
> ><br>
> ><br>
> > Lambdas return '<lambda>' so maybe something like '<composed>'?<br>
> > Then str(f) would be '<function <composed> at 0xffffffffffff>'.<br>
><br>
> Would be nice to use "<sin @ <lambda>>", incorporating both names, but<br>
> that could get unwieldy once you compose a bunch of functions.<br></p>
<p dir="ltr">Maybe it would be better to have '<function <composed> at 0xffffffffffff>' for str(f) but 'sin @ <lambda>' for repr (f). So that one can have more info and it would be closer to idealistic obj == eval (repr (obj)).<br>
</p>