18_globals = globals()
19_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
20_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'carbon_pb2', _globals)
21if _descriptor._USE_C_DESCRIPTORS == False:22
23 DESCRIPTOR._options = None
24 _globals['_POINT']._serialized_start=24
20_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'carbon_pb2', _globals)
21if _descriptor._USE_C_DESCRIPTORS == False:
22
23 DESCRIPTOR._options = None24 _globals['_POINT']._serialized_start=24
25 _globals['_POINT']._serialized_end=65
26 _globals['_METRIC']._serialized_start=67
21if _descriptor._USE_C_DESCRIPTORS == False:
22
23 DESCRIPTOR._options = None
24 _globals['_POINT']._serialized_start=2425 _globals['_POINT']._serialized_end=65
26 _globals['_METRIC']._serialized_start=67
27 _globals['_METRIC']._serialized_end=122
22
23 DESCRIPTOR._options = None
24 _globals['_POINT']._serialized_start=24
25 _globals['_POINT']._serialized_end=6526 _globals['_METRIC']._serialized_start=67
27 _globals['_METRIC']._serialized_end=122
28 _globals['_PAYLOAD']._serialized_start=124
23 DESCRIPTOR._options = None
24 _globals['_POINT']._serialized_start=24
25 _globals['_POINT']._serialized_end=65
26 _globals['_METRIC']._serialized_start=6727 _globals['_METRIC']._serialized_end=122
28 _globals['_PAYLOAD']._serialized_start=124
29 _globals['_PAYLOAD']._serialized_end=166
Accessing a protected member (a member prefixed with _
) of a class from outside that class is not recommended, since the creator of that class did not intend this member to be exposed. If accesing this attribute outside of the class is absolutely needed, refactor it such that it becomes part of the public interface of the class.
class Rectangle(object):
def __init__(self, height, width):
self._height = height
self._width = width
r = Rectangle(4, 8)
area = r._height * r._width
class Rectangle(object):
def __init__(self, height, width):
self._height = height
self._width = width
def area():
return self._height * self._width
r = Rectangle(4, 8)
area = r.area()