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

15번째 줄: 15번째 줄:
==같이 보기==
==같이 보기==
*[[class]]
*[[class]]
*[[정적 메소드]]

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

class method
static method

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 }}