OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 |
| 6 ################################################################################ |
| 7 # Base Class |
| 8 ################################################################################ |
| 9 |
| 10 class Alterable(object): |
| 11 def to_dict(self): # pragma: no cover |
| 12 """The shallow dictionary representation of this object (i.e. the dictionary |
| 13 may contain Alterable instances as values).""" |
| 14 raise NotImplementedError() |
| 15 |
| 16 def alter(self, **kwargs): # pragma: no cover |
| 17 """Returns a copy of self, except with the fields listed in kwargs replaced |
| 18 with new values.""" |
| 19 raise NotImplementedError() |
| 20 |
| 21 @classmethod |
| 22 def from_raw(cls, data): # pragma: no cover |
| 23 """Construct an instance of this class from a string.""" |
| 24 raise NotImplementedError() |
OLD | NEW |