Prepend schema object's from B{s}ource list to the B{d}estination list while applying the filter. @param d: The destination list. @type d: list @param s: The source list. @type s: list @param filter: A filter that allows items to be prepended.
(cls, d, s, filter=Filter())
| 51 | |
| 52 | @classmethod |
| 53 | def prepend(cls, d, s, filter=Filter()): |
| 54 | """ |
| 55 | Prepend schema object's from B{s}ource list to |
| 56 | the B{d}estination list while applying the filter. |
| 57 | @param d: The destination list. |
| 58 | @type d: list |
| 59 | @param s: The source list. |
| 60 | @type s: list |
| 61 | @param filter: A filter that allows items to be prepended. |
| 62 | @type filter: L{Filter} |
| 63 | """ |
| 64 | i = 0 |
| 65 | for x in s: |
| 66 | if x in filter: |
| 67 | d.insert(i, x) |
| 68 | i += 1 |
| 69 | |
| 70 | @classmethod |
| 71 | def append(cls, d, s, filter=Filter()): |
no test coverage detected