On Tue, May 11, 2010 at 2:18 AM, Richard Lamboj <richard.lam...@bilcom.at> wrote: <snip> > What i also want to know: >>>> variable1 = 10.50 >>>> type(variable1) > <type 'float'> > > Is there a way to tell python that it use antoher class than float for float, > like myfloat? Its just a "tell-me-what-is-possible". > > Sample: >>>> variable1 = 10.50 >>>> type(variable1) > <type 'myfloat'>
No, it's not possible to have the float literal syntax produce instances of your custom subclass. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list