Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have done exactly that as an exercise in what you can do with Python: overload |, and a decorator that you can use to on any function to return an instance of a callable class that calls that function and overloads |.

Whether it is a good idea to use it is another matter (it does not feel Pythonic), but it is easy to implement.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: