Python Pythonã ã¨ã¨ã©ã¼ã«ãªãã... class D: def x(self): return "x" class D: def y(self): return "y" obj = D() print obj.x() print obj.y() #=> Traceback (most recent call last): #=> File "qr_96298g4R.py", line 10, in <module> #=> print obj.x() #=> AttributeError: D instance has no attribute 'x' Ruby Rubyã§ã¯æ¢åã®ã¯ã©ã¹ãåãªã¼ãã³ãã¦ãã¡ã½ããã追å ããã class D def x "x" end end class D def y "y" end end obj = D.new puts obj.x p
{{#tags}}- {{label}}
{{/tags}}