2009-05-28から1日間の記事一覧

Pythonのdocstringとプライベート変数

いろいろ教えてもらったので復習がてらメモpoint.py """Point class This is the Point class """ class Point: __x = 0.0 __y = 0.0 z = 0.0 def __init__(self, x1, y1, z1) : self.__x = x1 self.__y = y1 self.z = z1 def toString(self) : return '(' +…