摘要: 6. ModulesIf you quit from the Python interpreter and enter it again, the definitions you have made (functions and variables) are lost. Therefore, if you want to write a somewhat longer program, you are better off using a text editor to prepare the input for the interpreter and running it with tha.. 阅读全文
posted @ 2011-08-20 16:35 Rabbit Nick 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 排名依据:1政治地位,2经济实力,3城市规模,4区域辐射力(注意政治地位因素的分量,所以北京高于上海,省会大多高于非省会等等)【一线城市】一线强:北京、上海(一个政治文化中心,一个经济中心,无争议)一 线:广州、深圳(南粤双雄,实力旗鼓相当,公认一线)准一线:天津(原本属于二线强,近几年国家重视、发展极快,步入准一线)【二线城市】二线强:南京、武汉、沈阳、西安、成都(都属于区域中心城市);重庆(直辖市)、杭州(经济发达、副省级);青岛、大连、宁波(三个经济发达的计划单列市)二线中:济南、哈尔滨、长春(剩下的三个副省级城市);厦门(计划单列市、规模小所以只能是二线中);郑州、长沙、福州(经济发. 阅读全文
posted @ 2011-08-20 14:07 Rabbit Nick 阅读(1344) 评论(0) 推荐(0) 编辑
摘要: 5. Data Structures¶This chapter describes some things you’ve learned about already in more detail, and adds some new things as well.加了一些新东西而已5.1. More on ListsThe list data type has some more methods. Here are all of the methods of list objects:list.append(x)Add an item to the end of the list; 阅读全文
posted @ 2011-08-20 13:46 Rabbit Nick 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 4.7.5. Lambda FormsBy popular demand, a few features commonly found in functional programming languages like Lisp have been added to Python. With thelambdakeyword, small anonymous functions can be created. Here’s a function that returns the sum of its two arguments:lambdaa,b:a+b. Lambda forms can be 阅读全文
posted @ 2011-08-20 12:50 Rabbit Nick 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 白看了几天。。其实看得半懂半不懂。。。而且网上有个大牛觉得这本书很不掂。。。还是看官方的教程比较好:网址:http://docs.python.org/tutorial/controlflow.html#more-on-defining-functions 阅读全文
posted @ 2011-08-20 01:58 Rabbit Nick 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 第5章对象和面向对象 5.1. 概览 5.2. 使用 from module import 导入模块 5.3. 类的定义 5.3.1. 初始化并开始类编码 5.3.2. 了解何时去使用 self 和 __init__ 5.4. 类的实例化 5.4.1. 垃圾回收 5.5. 探索 UserDict:一个封装类 5.6. 专用类方法 5.6.1. 获得和设置数据项 5.7. 高级专用类方法 5.8. 类属性介绍 5.9. 私有函数 5.10. 小结这一章,和此后的许多章,均讨论了面向对象的 Python 程序设计。5.1.概览下面是一个完整的,可运行的 Python 程序。请阅读模块、类和函数的 阅读全文
posted @ 2011-08-20 01:55 Rabbit Nick 阅读(219) 评论(0) 推荐(0) 编辑