Changes between Initial Version and Version 1 of shunfa/2009/1029


Ignore:
Timestamp:
Oct 30, 2009, 9:12:43 AM (15 years ago)
Author:
shunfa
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • shunfa/2009/1029

    v1 v1  
     1= Python Note =
     2
     3== class ==
     4
     5=== constructor ===
     6
     7example:
     8{{{
     9#!python
     10class myClass:
     11    def __init__(self):
     12        print self
     13}}}
     14
     15result:
     16{{{
     17#!text
     18>>> myClass
     19<class __main__.myClass at 0x011ED690>
     20}}}
     21
     22
     23=== 內建屬性 ===
     24 * classname.!__dict!__: 類別內的屬性以辭典集物件方式儲存