(self)
| 1171 | return inst |
| 1172 | |
| 1173 | def copy(self): |
| 1174 | if self.__class__ is UserDict: |
| 1175 | return UserDict(self.data.copy()) |
| 1176 | import copy |
| 1177 | data = self.data |
| 1178 | try: |
| 1179 | self.data = {} |
| 1180 | c = copy.copy(self) |
| 1181 | finally: |
| 1182 | self.data = data |
| 1183 | c.update(self) |
| 1184 | return c |
| 1185 | |
| 1186 | @classmethod |
| 1187 | def fromkeys(cls, iterable, value=None): |