I'm pretty new to Python and have been writing a code that will read and write from a binary file.

I decided to create classes for every type of data that will be contained within the file, and to keep them organized I made one class they would all inherit, called InteriorIO. I want each class to have a read and write method which would read/write the data to/from the file. At the same time as inheriting InteriorIO however, I want them to behave like str or int in that they return the value they contain, so I'd modify either `__str__` or `__int__` depending on what they most closely resemble.

```
class InteriorIO(object):
    __metaclass__ = ABCMeta

    @abstractmethod
    def read(this, f):
        pass

    @abstractmethod
    def write(this, f):
        pass

class byteIO(InteriorIO):
    def __init__(this, value=None):
        this.value = value

    def read(this, f):
        this.value = struct.unpack("B", f.read(1))[0]

    def __str__:
        return value;

class U16IO(InteriorIO):
    def __init__(this, value=None):
        this.value = value

    def read(this, f):
        this.value = struct.unpack("<H", f.read(2))[0]

    def __int__:
        return value;

# how I'd like it to work
f.open("C:/some/path/file.bin")
# In the file, the fileVersion is a U16
fileVersion = U16IO()
# We read the value from the file, storing it in fileVersion
fileVersion.read(f)
# writes the fileVersion that was just read from the file
print(str(fileVersion))
# now let's say we want to write the number 35 to the file in the form of a U16, so we store the value 35 in valueToWrite
valueToWrite = U16IO(35)
# prints the value 35
print(valueToWrite)
# writes the number 35 to the file
valueToWrite.write(f)
f.close()

```

The code on the bottom works, but the classes feel wrong and too ambiguous. I'm setting `this.value`, which is a random name I came up with, for every object as a sort of "main" value, and then returning said value as the type I want it to be.

What is the cleanest way to organize my classes such that they all inherit from InteriorIO, yet behave like a str or int in that they return their value?