| 157 | |
| 158 | # Read-only list, used for Model.documents. |
| 159 | class readonlylist(list): |
| 160 | def __init__(self, *args, **kwargs): |
| 161 | list.__init__(self, *args, **kwargs) |
| 162 | def __setitem__(self, i, v): |
| 163 | raise ReadOnlyError |
| 164 | def __delitem__(self, i): |
| 165 | raise ReadOnlyError |
| 166 | def append(self, v): |
| 167 | raise ReadOnlyError |
| 168 | def extend(self, v): |
| 169 | raise ReadOnlyError |
| 170 | def insert(self, i, v): |
| 171 | raise ReadOnlyError |
| 172 | def remove(self, v): |
| 173 | raise ReadOnlyError |
| 174 | def pop(self, i): |
| 175 | raise ReadOnlyError |
| 176 | |
| 177 | #### DOCUMENT ###################################################################################### |
| 178 | |