On 2012-04-07, Jon Clements jon...@googlemail.com wrote:
Any reason you can't derive from int instead of object? You may
also want to check out functions.total_ordering on 2.7+
functools.total_ordering
I was temporarily tripped up by the aforementioned documentation,
myself.
--
Neil Cerutti
On Monday, 9 April 2012 12:33:25 UTC+1, Neil Cerutti wrote:
On 2012-04-07, Jon Clements jon...@googlemail.com wrote:
Any reason you can't derive from int instead of object? You may
also want to check out functions.total_ordering on 2.7+
functools.total_ordering
I was temporarily
hi,
please, what am i doing wrong here? the docs say
http://docs.python.org/release/3.1.3/library/stdtypes.html#comparisons in
general, __lt__() and __eq__() are sufficient, if you want the conventional
meanings of the comparison operators but i am seeing
assert 2 three
E
Am 07.04.2012 14:23 schrieb andrew cooke:
class IntVar(object):
def __init__(self, value=None):
if value is not None: value = int(value)
self.value = value
def setter(self):
def wrapper(stream_in, thunk):
self.value = thunk()
andrew cooke wrote in
news:33019705.1873.1333801405463.JavaMail.geo-discussion-forums@ynmm9 in
gmane.comp.python.general:
hi,
please, what am i doing wrong here? the docs say
http://docs.python.org/release/3.1.3/library/stdtypes.html#comparisons
in general, __lt__() and __eq__() are
On Sat, 7 Apr 2012 05:23:25 -0700 (PDT)
andrew cooke and...@acooke.org wrote:
hi,
please, what am i doing wrong here? the docs say
http://docs.python.org/release/3.1.3/library/stdtypes.html#comparisons in
general, __lt__() and __eq__() are sufficient, if you want the conventional
Thomas Rachel wrote:
Am 07.04.2012 14:23 schrieb andrew cooke:
class IntVar(object):
def __init__(self, value=None):
if value is not None: value = int(value)
self.value = value
def setter(self):
def wrapper(stream_in, thunk):
Any reason you can't derive from int instead of object? You may also want to
check out functions.total_ordering on 2.7+
--
http://mail.python.org/mailman/listinfo/python-list