Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

I've fixed math

Name: Anonymous 2006-12-05 7:27

>>> class Infinity(object):
...     __str__ = lambda s: 'Infinity'
...     __unicode__ = lambda s: u'Infinity'
...     __repr__ = lambda s: 'Infinity()'
...
>>> class intex(int):
...     def __div__(self, other):
...         if other == 0:
...             return Infinity()
...         else:
...             return int(self) / other
...
>>> i = intex(10)
>>> print i / 2
5
>>> print i / 0
Infinity

Name: Anonymous 2006-12-05 7:56


............................................________
....................................,.-‘”...................``~.,
.............................,.-”...................................“-.,
.........................,/...............................................”:,
.....................,?......................................................\,
.................../...........................................................,}
................./......................................................,:`^`..}
.............../...................................................,:”........./
..............?.....__.........................................:`.........../
............./__.(.....“~-,_..............................,:`........../
.........../(_....”~,_........“~,_....................,:`........_/
..........{.._$;_......”=,_.......“-,_.......,.-~-,},.~”;/....}
...........((.....*~_.......”=-._......“;,,./`..../”............../
...,,,___.\`~,......“~.,....................`.....}............../
............(....`=-,,.......`........................(......;_,,-”
............/.`~,......`-...............................\....../\
.............\`~.*-,.....................................|,./.....\,__
,,_..........}.>-._\...................................|..............`=~-,
.....`=~-,_\_......`\,.................................\
...................`=~-,,.\,...............................\
................................`:,,...........................`\..............__
.....................................`=-,...................,%`>--==``
........................................_\..........._,-%.......`\
...................................,<`.._|_,-&``................`\

Don't change these.
Name: Email:
Entire Thread Thread List