(self)
| 1201 | return inst |
| 1202 | |
| 1203 | def copy(self): |
| 1204 | if self.__class__ is UserDict: |
| 1205 | return UserDict(self.data.copy()) |
| 1206 | import copy |
| 1207 | data = self.data |
| 1208 | try: |
| 1209 | self.data = {} |
| 1210 | c = copy.copy(self) |
| 1211 | finally: |
| 1212 | self.data = data |
| 1213 | c.update(self) |
| 1214 | return c |
| 1215 | |
| 1216 | @classmethod |
| 1217 | def fromkeys(cls, iterable, value=None): |