Advertisement

Python面向对象编程(第2版)- 第二章案例研究

阅读量:

Test1

复制代码
 >>> notebook.py

    
  
    
 import datetime
    
  
    
 # Store the next available id for all new notes
    
 last_id = 0
    
  
    
 class Note:
    
     '''Represent a note in the notebook. Match against a
    
     sring in searches and store tage for each note.'''
    
  
    
     def __init__(self, memo, tags = ''):
    
     '''initialize a note with memo and optional space-seperated tags.
    
     Automatically set the note`s creation date and a unique id.'''
    

全部评论 (0)

还没有任何评论哟~