Google Python Style Guide
methods overridden in subclasses are called by the property (using the Template Method DP). Yes: import math class Square(object): 10 """A square with two properties: a writable area and a read-only perimeter return self.__get_area() def __set_area(self, area): """Sets the 'area' property.""" self.side = math.sqrt(area) def ___set_area(self, area): """Indirect setter for 'area' property.""" self.__set_area(area) not to use the new styles. Yes: words = foo.split(':') [x[1] for x in my_list if x[2] == 5] map(math.sqrt, data) # Ok. No inlined lambda expression. fn(*args, **kwargs) No: words = string.split(foo0 码力 | 30 页 | 94.81 KB | 1 年前3Google C++ Style Guide
i_geometry_type.hpp • Bimap from boost/bimap • Statistical Distributions and Functions from boost/math/distributions • Multi-index from boost/multi_index • Heap from boost/heap • The flat containers from0 码力 | 83 页 | 238.71 KB | 1 年前3
共 2 条
- 1