Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ruby is beautiful (but I'm moving to Python).
fwiw: this works in python too
>>> class Foo(object): ... def __add__(self, x): ... print "%s+%s"%(self,x) ... >>> a = Foo() >>> a+=8 <__main__.Foo object at 0x657d0>+8 >>>
You can override __iadd__ separately too.
There are no comments on this comment yet.
fwiw: this works in python too
>>> class Foo(object): ... def __add__(self, x): ... print "%s+%s"%(self,x) ... >>> a = Foo() >>> a+=8 <__main__.Foo object at 0x657d0>+8 >>>
You can override __iadd__ separately too.