having seen descriptors used to generate data without necessarily storing itwe will now look at descriptor that can be used to store all of an object' attribute datawith the object not needing to store anything itself in the examplewe will just use dictionarybut in more realistic contextthe data might be stored in file or database here' the start of modified version of the point class that makes use of the descriptor (from the externalstorage py file)class point__slots__ ( externalstorage(" " externalstorage(" "def __init__(selfx= = )self self by setting __slots__ to an empty tuple we ensure that the class cannot store any data attributes at all when self is assigned topython finds that there is descriptor with the name " "and so uses the descriptor' __set__(method the rest of the class isn' shownbut is the same as the original point class shown in here is the complete externalstorage descriptor classclass externalstorage__slots__ ("attribute_name",__storage {def __init__(selfattribute_name)self attribute_name attribute_name def __set__(selfinstancevalue)self __storage[id(instance)self attribute_namevalue def __get__(selfinstanceowner=none)if instance is nonereturn self return self __storage[id(instance)self attribute_nameeach externalstorage object has single data attributeattribute_namewhich holds the name of the owner class' data attribute whenever an attribute is set we store its value in the private class dictionary__storage similarlywhenever an attribute is retrieved we get it from the __storage dictionary as with all descriptor methodsself is the instance of the descriptor object and instance is the self of the object that contains the descriptorso here self is an externalstorage object and instance is point object