Changes between Initial Version and Version 1 of Python
- Timestamp:
- 06/16/06 09:02:40 (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Python
v1 v1 1 = Python = 2 [[PageOutline]] 3 4 メモ.主に日記からの転載. 5 6 == 可変長引数 == 7 {{{ 8 #!python 9 >>> def hoge(*a): 10 ... print a 11 >>> hoge(1, 2, 3) 12 (1, 2, 3) 13 14 >>> def hage(a, b, c): 15 ... print a, b, c 16 >>> a = (1, 2, 3) 17 >>> hage(*a) 18 1 2 3 19 20 >>> def hige(**a): 21 ... print a 22 >>> hige(a=1, b=2, c=3) 23 {'a': 1, 'c': 3, 'b': 2} 24 25 >>> def huge(a, b, c): 26 ... print a, b, c 27 >>> a = {'a': 1, 'b': 2, 'c': 3} 28 >>> huge(**a) 29 1 2 3 30 }}}