"Keyword Arguments"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
3번째 줄: 3번째 줄:
==Python==
==Python==
[[category: Python]]
[[category: Python]]
<source lang='Python'>
<syntaxhighlight lang='Python'>
def showUrl( host, port ):
def showUrl( host, port ):
     print( 'http://' + host + ':' + str(port) )
     print( 'http://' + host + ':' + str(port) )
11번째 줄: 11번째 줄:
# http://google.com:80
# http://google.com:80
# http://google.com:80
# http://google.com:80
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[Optional Arguments]]
*[[Optional Arguments]]
*[[Unpacking Argument Lists]]
*[[Unpacking Argument Lists]]

2020년 11월 2일 (월) 02:31 기준 최신판

keyword arguments

1 Python[ | ]

def showUrl( host, port ):
    print( 'http://' + host + ':' + str(port) )

showUrl( 'google.com', 80 )
showUrl( port=80, host='google.com' )
# http://google.com:80
# http://google.com:80

2 같이 보기[ | ]

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