摘要: 名称改写的规则 当属性名以双下划线开头(且不以双下划线结尾,如__x__),Python会自动在属性名前加上_类名作为前缀。 例如: python class Person: def init(self, height, weight): self.__height = height # 实际会被改 阅读全文
posted @ 2025-06-13 10:25 劉半仙 阅读(38) 评论(0) 推荐(0)