dynamic attributes, descriptors and first concurrency examples

This commit is contained in:
Luciano Ramalho
2015-01-17 22:40:40 -02:00
parent 0618105a47
commit dd1a53ff71
27 changed files with 1151 additions and 216 deletions

View File

@@ -6,7 +6,7 @@ class Quantity:
cls = self.__class__
prefix = cls.__name__
index = cls.__counter
self.storage_name = '_{}_{}'.format(prefix, index)
self.storage_name = '_{}:{}'.format(prefix, index)
cls.__counter += 1
def __get__(self, instance, owner):