OLD | NEW |
1 # Protocol Buffers - Google's data interchange format | 1 # Protocol Buffers - Google's data interchange format |
2 # Copyright 2008 Google Inc. All rights reserved. | 2 # Copyright 2008 Google Inc. All rights reserved. |
3 # http://code.google.com/p/protobuf/ | 3 # http://code.google.com/p/protobuf/ |
4 # | 4 # |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 return [value_descriptor.number | 80 return [value_descriptor.number |
81 for value_descriptor in self._enum_type.values] | 81 for value_descriptor in self._enum_type.values] |
82 | 82 |
83 def items(self): | 83 def items(self): |
84 """Return a list of the (name, value) pairs of the enum. | 84 """Return a list of the (name, value) pairs of the enum. |
85 | 85 |
86 These are returned in the order they were defined in the .proto file. | 86 These are returned in the order they were defined in the .proto file. |
87 """ | 87 """ |
88 return [(value_descriptor.name, value_descriptor.number) | 88 return [(value_descriptor.name, value_descriptor.number) |
89 for value_descriptor in self._enum_type.values] | 89 for value_descriptor in self._enum_type.values] |
OLD | NEW |