Looking for assignement operator

Bruno Desthuilliers onurb at xiludom.gro
Wed Oct 18 04:37:42 EDT 2006


Tommi wrote:
(please don't top-post - corrected)
> 
> 
> Alexander Eisenhuth wrote:
>> Hello,
>>
>> is there a assignement operator, that i can overwrite?
>>
>> class MyInt:
>> 	def __init__(self, val):
>> 		assert(isinstance(val, int))
>> 		self._val = val
>>
>> a = MyInt(10)
>>
>> # Here i need to overwrite the assignement operator
>> a = 12
>>

> Could the "traits" package be of help?
>
> http://code.enthought.com/traits/
>

How could it help ?

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list