Merge all attributes and metadata from I{a} to I{b}. @param a: A I{source} object @type a: L{Object} @param b: A I{destination} object @type b: L{Object}
(a, b)
| 55 | |
| 56 | |
| 57 | def merge(a, b): |
| 58 | """ |
| 59 | Merge all attributes and metadata from I{a} to I{b}. |
| 60 | @param a: A I{source} object |
| 61 | @type a: L{Object} |
| 62 | @param b: A I{destination} object |
| 63 | @type b: L{Object} |
| 64 | """ |
| 65 | for item in a: |
| 66 | setattr(b, item[0], item[1]) |
| 67 | b.__metadata__ = b.__metadata__ |
| 68 | return b |
| 69 | |
| 70 | |
| 71 | def footprint(sobject): |