"Static method"의 두 판 사이의 차이

(새 문서: ==Python== category: Python <source lang='Python'> </source> ==같이 보기== *class)
 
3번째 줄: 3번째 줄:
[[category: Python]]
[[category: Python]]
<source lang='Python'>
<source lang='Python'>
class myUtil(object):
    def square(x):
        return x * x


print( myUtil.square(3) )
# 9
</source>
</source>


==같이 보기==
==같이 보기==
*[[class]]
*[[class]]

2014년 8월 22일 (금) 14:32 판

1 Python

class myUtil(object):
    def square(x):
        return x * x

print( myUtil.square(3) )
# 9

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}