| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2015 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 """Python utils.""" |
| 6 |
| 7 |
| 8 def overrides(parent_class): |
| 9 """Inherits the docstring from the method of the same name in the indicated |
| 10 parent class. |
| 11 """ |
| 12 def overriding(method): |
| 13 assert(method.__name__ in dir(parent_class)) |
| 14 method.__doc__ = getattr(parent_class, method.__name__).__doc__ |
| 15 return method |
| 16 return overriding |
| OLD | NEW |