diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-04 00:20:04 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-04 00:32:02 +0200 |
| commit | d9007ab28b381ae45c2eae0baa349f130a41a262 (patch) | |
| tree | d26fee537c10b942dd7d2a06304fa0691f44fc8d /kconfiglib.py | |
| parent | bc83c86a001bcb649b1c8a9c140cdadaea2b2947 (diff) | |
Consistently use new-style classes.
Ugly oversight. Gives a nice ~13% parsing performance increase with both
CPython and PyPy on my system.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index d472ef9..b04b5de 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -71,7 +71,7 @@ import re import string import sys -class Config(): +class Config(object): """Represents a Kconfig configuration, e.g. for i386 or ARM. This is the set of symbols and other items appearing in the configuration together with @@ -2214,7 +2214,7 @@ def _expr_to_str_rec(expr): op_to_str[expr[0]], _sym_str_string(expr[2])] -class _Block: +class _Block(object): """Represents a list of items (symbols, menus, choice statements and comments) appearing at the top-level of a file or witin a menu, choice or @@ -2243,7 +2243,7 @@ class _Block: for item in self.items: item.add_depend_expr(expr) -class Item(): +class Item(object): """Base class for symbols and other Kconfig constructs. Subclasses are Symbol, Choice, Menu, and Comment.""" @@ -2268,7 +2268,7 @@ class Item(): isinstance(item, kconfiglib.Comment).""" return isinstance(self, Comment) -class _HasVisibility(): +class _HasVisibility(object): """Base class for elements that have a "visibility" that acts as an upper limit on the values a user can set for them. Subclasses are Symbol and @@ -3566,7 +3566,7 @@ class Comment(Item): return ["\n#\n# {0}\n#".format(self.text)] return [] -class _Feed: +class _Feed(object): """Class for working with sequences in a stream-like fashion; handy for tokens.""" |
