Upgrade the code object of a function
(old, new)
| 260 | |
| 261 | |
| 262 | def update_function(old, new): |
| 263 | """Upgrade the code object of a function""" |
| 264 | for name in func_attrs: |
| 265 | try: |
| 266 | setattr(old, name, getattr(new, name)) |
| 267 | except (AttributeError, TypeError): |
| 268 | pass |
| 269 | |
| 270 | |
| 271 | def update_instances(old, new): |