A Custom Set that changes the casing of it's keys :param func casing: a function to convert into specified case
(self, *args, casing=None, **kwargs)
| 82 | |
| 83 | class TrackerSet(set): |
| 84 | def __init__(self, *args, casing=None, **kwargs): |
| 85 | """ A Custom Set that changes the casing of it's keys |
| 86 | |
| 87 | :param func casing: a function to convert into specified case |
| 88 | """ |
| 89 | self.cc = casing |
| 90 | super().__init__(*args, **kwargs) |
| 91 | |
| 92 | def add(self, value): |
| 93 | value = self.cc(value) |