<html><head></head><body>What about "apply"? It's the closest thing to "fmap" I can think of that won't coblnfuse people...<br><br><div class="gmail_quote">On September 18, 2015 6:44:31 PM CDT, "Sven R. Kunze" <srkunze@mail.de> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><br /><br />On 19.09.2015 01:18, Erik wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Apologies for the self-reply. I just wanted to clarify a couple of <br /> things.<br /><br /> On 18/09/15 23:56, Erik wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> If the foo operator uses the magic method "__foo__" to mean "return an<br /> object to be used in place of the operand should it be considered ...<br /> false? [or some other definition - I'm not sure]"<br /></blockquote><br /> Not "false", I think. The "foo" operator is meant to mean "I will go <br /> on to use the resulting object in any way imaginable and it must cope <br /> with that and return a value from any attempts to use it that will <br /> generally mean 'no'" (*).<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex;
border-left: 1px solid #ad7fa8; padding-left: 1ex;"> If that was a postfix operator which has a high precedence, then:<br /><br /> bar = foo?<br /> bar.isoformat()<br /><br /> and the original syntax suggestion:<br /><br /> bar = foo?.isoformat()<br /></blockquote><br /> Which is clearly wrong - the first part should be:<br /><br /> baz = foo?<br /> bar = baz.isoformat()<br /><br /> E.<br /><br /> (*) Should we call the operator "shrug"?<br /></blockquote><br />Maybe monad?<br /><hr /><br />Python-ideas mailing list<br />Python-ideas@python.org<br /><a href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a><br />Code of Conduct: <a href="http://python.org/psf/codeofconduct">http://python.org/psf/codeofconduct</a>/<br /></pre></blockquote></div><br>
-- <br>
Sent from my Nexus 5 with K-9 Mail. Please excuse my brevity.</body></html>