Storing value with limits in object

Josip fake.mail at
Sun Jun 22 12:24:35 CEST 2008

> Not with normal vars, because = is a rebinding operator in Python,
> rather than assignment.
> You can do (close to) the above with object properties.
> David.

Yes, but it's done with built-in types like int and float. I suspect I could 
subclass from them and implement limits, but I would have to make
seperate class for each type. Can I override conversion methods like int() 
and float() within my class? 

More information about the Python-list mailing list