摘要: We have used many of Python’s built-in types; now we are going to define a new type. As an example, we will create a type called Point that represents... 阅读全文
posted @ 2014-09-23 22:35 平静缓和用胸音说爱 阅读(280) 评论(0) 推荐(0) 编辑
摘要: Pickle translates almost any type of object into a string. pickle.dumps takes an object as a parameter and returns a string representation. ... 阅读全文
posted @ 2014-09-23 22:10 平静缓和用胸音说爱 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Files are organized into directories (also called ‘folders’). Every running program has a ‘current directory’, which is the default directory for most... 阅读全文
posted @ 2014-09-23 15:27 平静缓和用胸音说爱 阅读(200) 评论(0) 推荐(0) 编辑
摘要: The argument of write has to be a string, so if we want to put other values in a file, we have to convert them to strings. The easiest way to do that ... 阅读全文
posted @ 2014-09-23 11:55 平静缓和用胸音说爱 阅读(209) 评论(0) 推荐(0) 编辑