2009/2/6 Ken Elkabany k...@elkabany.com:
I am attempting to fully-simulate an 'int' object with a custom object type.
It is part of a library I am creating for python futures and promises. Is
there anyway such that type(my_object) can return type 'int'?
If it's enough to change how the type
Hello,
I am attempting to fully-simulate an 'int' object with a custom object type.
It is part of a library I am creating for python futures and promises. Is
there anyway such that type(my_object) can return type 'int'? Or for that
matter, any other primitive? I do not care how dirty the solution
On Fri, Feb 6, 2009 at 3:03 AM, Ken Elkabany k...@elkabany.com wrote:
Hello,
I am attempting to fully-simulate an 'int' object with a custom object type.
It is part of a library I am creating for python futures and promises. Is
there anyway such that type(my_object) can return type 'int'? Or
Ken Elkabany schrieb:
I would simply subclass 'int', but this object needs to be general enough to
pretend to be an 'int', 'NoneType', 'str', etc... A long shot: Can I change
the base class on an instance by instance basis depending on the need? Well,
now I can imagine having a class factory
I would simply subclass 'int', but this object needs to be general enough to
pretend to be an 'int', 'NoneType', 'str', etc... A long shot: Can I change
the base class on an instance by instance basis depending on the need? Well,
now I can imagine having a class factory that will spawn for me the
Ken Elkabany wrote:
Hello,
I am attempting to fully-simulate an 'int' object with a custom object
type. It is part of a library I am creating for python futures and
promises. Is there anyway such that type(my_object) can return type
'int'? Or for that matter, any other primitive? I do not