human
I am working on the file "DecoratorsTalk.ipynb".
The first task is:
Usage of @property
Can you write Python code for it?

=====
Write me a the Python code you requested?
assistant
#Here is the Python code you requested.

class StrictAttributeHolder(object):
    def __init__(self):
        self._int_val = None
        
    @property
    def int_val(self):
        if self._int_val is not None:
            return self._int_val
        else:
            raise Exception("Can't read what isn't written!")
    
    @int_val.setter
    def int_val(self, value):
        if isinstance(value, int):
            self._int_val = value
        else:
            raise TypeError("Can't set int_val to a non-int value!")

sah = StrictAttributeHolder()

print sah.int_val

sah.int_val = 5

print sah.int_val

sah.int_val = 5.0

sah.int_val = [5]