What about "apply"? It's the closest thing to "fmap" I can think of that won't coblnfuse people...
On September 18, 2015 6:44:31 PM CDT, "Sven R. Kunze" firstname.lastname@example.org wrote:
On 19.09.2015 01:18, Erik wrote:
Apologies for the self-reply. I just wanted to clarify a couple of things.
On 18/09/15 23:56, Erik wrote:
If the foo operator uses the magic method "__foo__" to mean "return
object to be used in place of the operand should it be considered
false? [or some other definition - I'm not sure]"
Not "false", I think. The "foo" operator is meant to mean "I will go on to use the resulting object in any way imaginable and it must cope
with that and return a value from any attempts to use it that will generally mean 'no'" (*).
If that was a postfix operator which has a high precedence, then:
bar = foo? bar.isoformat()
and the original syntax suggestion:
bar = foo?.isoformat()
Which is clearly wrong - the first part should be:
baz = foo? bar = baz.isoformat()
(*) Should we call the operator "shrug"?
Maybe monad? _______________________________________________ Python-ideas mailing list Pythonemail@example.com https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/