Aug-23-2017, 12:47 AM
intercepting/replacing (or adding) methods of existing builtin types is something i have generally wanted to do. an example of what i mean is to replace the __repr__ method of type int (and long in python2) to convert in hexadecimal instead of decimal. by adding i mean adding, to the class as a whole, not individual object instances, a new method attribute.
is this doable without hacking the interpreter source? example types i want to do this with include bool, int, long, float.
is this doable without hacking the interpreter source? example types i want to do this with include bool, int, long, float.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.