Hacker News new | past | comments | ask | show | jobs | submit login

To nitpick (and maybe derail this subthread a bit), you can do some pretty weird stuff with Python's numeric types. Unfortunately, the fascists who designed the language refuse to allow me to modify certain builtins...

  AttributeError: 'int' object has no attribute '__call__'
I mean, of course it doesn't, that's what I'm trying to fix.

At one point, I was desirous of having floating point numbers whose value decayed toward zero each time the number was accessed; you can achieve this by defining a custom class and implementing all the methods needed to make it behave like a float, but it's not the same.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: