Changes between Initial Version and Version 1 of shunfa/2009/1029
- Timestamp:
- Oct 30, 2009, 9:12:43 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
shunfa/2009/1029
v1 v1 1 = Python Note = 2 3 == class == 4 5 === constructor === 6 7 example: 8 {{{ 9 #!python 10 class myClass: 11 def __init__(self): 12 print self 13 }}} 14 15 result: 16 {{{ 17 #!text 18 >>> myClass 19 <class __main__.myClass at 0x011ED690> 20 }}} 21 22 23 === 內建屬性 === 24 * classname.!__dict!__: 類別內的屬性以辭典集物件方式儲存