Custom Infix Operators in Python
R has the neat feature that you can easily define your own infix operators. I’ve sometimes wished Python had a similar feature, so I created a short notebook showing a hacky way to implement custom infix operators in Python. While you should probably never need to use this hack, it does show off an interesting application of dunder methods and decorators. So it’s worth taking a look at, especially if you’ve never seen those cool Python features.