Return a copy as a Struct. Examples -------- >>> s = Struct(a=10,b=30) >>> s2 = s.copy() >>> type(s2) is Struct True
(self)
| 232 | return self |
| 233 | |
| 234 | def copy(self): |
| 235 | """Return a copy as a Struct. |
| 236 | |
| 237 | Examples |
| 238 | -------- |
| 239 | |
| 240 | >>> s = Struct(a=10,b=30) |
| 241 | >>> s2 = s.copy() |
| 242 | >>> type(s2) is Struct |
| 243 | True |
| 244 | """ |
| 245 | return Struct(dict.copy(self)) |
| 246 | |
| 247 | def hasattr(self, key): |
| 248 | """hasattr function available as a method. |