using extended built-in types

R

Rim

Hi,

When I extend a built-in type, how do I cause the extended type to
be used by default, without having to specify it? For instance, say I
extend the int type:

class myint(int):
def foo(self): print 'foo'

How do I make all future integers use myint instead of int without explicitely
say a = myint(value)?

Thanks
- Rim
 
M

Martin v. =?iso-8859-15?q?L=F6wis?=

How do I make all future integers use myint instead of int without
explicitely say a = myint(value)?

That is not possible.

Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top