(self, instance, state)
| 549 | return cls(*args, **kwds) |
| 550 | |
| 551 | def set_python_instance_state(self, instance, state): |
| 552 | if hasattr(instance, '__setstate__'): |
| 553 | instance.__setstate__(state) |
| 554 | else: |
| 555 | slotstate = {} |
| 556 | if isinstance(state, tuple) and len(state) == 2: |
| 557 | state, slotstate = state |
| 558 | if hasattr(instance, '__dict__'): |
| 559 | instance.__dict__.update(state) |
| 560 | elif state: |
| 561 | slotstate.update(state) |
| 562 | for key, value in slotstate.items(): |
| 563 | setattr(object, key, value) |
| 564 | |
| 565 | def construct_python_object(self, suffix, node): |
| 566 | # Format: |
no test coverage detected