[Python-ideas] Infix application of binary functions

Ben Finney ben+python at benfinney.id.au
Thu Jul 22 07:59:53 CEST 2010


Dag Odenhall <dag.odenhall at gmail.com>
writes:

> > This can be done in Python today:
>
> Quoting myself from the original post:
>
> It is already possible[1] to make infix functions, but the solution is
> a hack and requires functions to be marked as infix.

I don't see how “add a new punctuation character to the syntax in every
place where this is to be used” is less of a hack.

For reference you might want to read over the debates that preceded the
introduction of ‘@’ to the language. There is *very strong* resistance
to adding syntax that uses arbitrary punctuation characters.

IMO that resistance is for good reason: punctuation beyond what Python
already supports today rarely improves readability, and usually worsens
it.

-- 
 \         “All television is educational television. The question is: |
  `\                           what is it teaching?” —Nicholas Johnson |
_o__)                                                                  |
Ben Finney




More information about the Python-ideas mailing list