上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 22 下一页
摘要: 一, 1. 类的声明和创建对于 Python 函数来说,声明与定义类没什么区别,因为他们是同时进行的,定义(类体)紧跟在声明(含 class 关键字的头行[header line])和可选(但总是推荐使用)的文档字符串后面。同时,所有的方法也必须同时被定义。请注意 Python 并不支持纯虚函数(像 阅读全文
posted @ 2019-08-16 15:54 Augustone 阅读(255) 评论(0) 推荐(0)
摘要: 概论: oop方法将世界看作一个有结构、有组织、有层次、有普遍联系,有属性特征、有行为方法的有机体、生命体,在oop当中对象不仅有数据和结构,而且有控制代码、行为、函数、方法,自身特征与自身行为封装到类中,实例化到具体事务当中,每个层面均有自身意义,下层可以继承上层,乃至多个上层,下层可以传承、繁衍 阅读全文
posted @ 2019-08-15 18:57 Augustone 阅读(1212) 评论(0) 推荐(0)
摘要: 一,简介 Author Info Adapter Augustone Zhang Updated: August 8, 2019 Explore this Article Using the from-import instruction Using the import instruction A 阅读全文
posted @ 2019-08-15 09:06 Augustone 阅读(347) 评论(0) 推荐(0)
摘要: python -m compileall 目录 # 存放python源代码的目录 在目录下生成__pycache__目录,该目录中包含源代码对应的预编译文件.pyc python 文件.pyc 此时执行速度更快(实际上是编译更快,或者说省去了编译的步骤(但如果源程序修改则须重新编译)) 即时速度更快 阅读全文
posted @ 2019-08-14 10:10 Augustone 阅读(3103) 评论(0) 推荐(0)
摘要: 总结:(源文件名为loops.c) 可以转换到不同阶段。阶段1,将头文件加进来。阶段2,转换成汇编程序,与机器类型相关。阶段3,转换成机器码,但不完整。阶段4,链接其他系统文件,形成最终可执行文件 cc -E -o loops-firststep.e loops.ccc -S -o loops-se 阅读全文
posted @ 2019-08-14 08:45 Augustone 阅读(3166) 评论(0) 推荐(1)
摘要: Table of Contents Defining a Set Set Size and Membership Operating on a Set Operators vs. Methods Available Operators and Methods Modifying a Set Augm 阅读全文
posted @ 2019-08-13 23:59 Augustone 阅读(322) 评论(0) 推荐(0)
摘要: Table of Contents Defining a Dictionary#定义一个字典 Accessing Dictionary Values#访问字典的值 Dictionary Keys vs. List Indices#字典的键与列表的索引 Building a Dictionary In 阅读全文
posted @ 2019-08-13 23:56 Augustone 阅读(245) 评论(0) 推荐(0)
摘要: Python iterators and generators In this part of the Python tutorial, we work with interators and generators. Iterator is an object which allows a prog 阅读全文
posted @ 2019-08-12 23:50 Augustone 阅读(307) 评论(0) 推荐(0)
摘要: When new Python syntax is introduced, the usual approach will be to give both specific examples and general templates. In general templates for Python 阅读全文
posted @ 2019-08-12 10:12 Augustone 阅读(560) 评论(0) 推荐(0)
摘要: Python列表 Python list is a sequence of values, it can be any type, strings, numbers, floats, mixed content, or whatever. In this post, we will talk abo 阅读全文
posted @ 2019-08-11 09:26 Augustone 阅读(371) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 22 下一页