08 2019 档案

摘要:在Python中被双下划线包围的方法,__init__、__str__、__doc__、__new__等,被称为"魔术方法"(Magic methods)#更严谨的说法是内建方法。魔术方法在类或对象的某些事件出发后会自动执行,如果希望根据自己的程序定制自己特殊功能的类,那么就需要对这些方法进行重写。 阅读全文
posted @ 2019-08-19 17:01 Augustone 阅读(345) 评论(0) 推荐(0) 编辑
摘要:sudo dpkg-reconfigure locales dpkg即debian的package软件管理程序 dpkg -l/-r/-i都很有用 阅读全文
posted @ 2019-08-18 10:02 Augustone 阅读(326) 评论(0) 推荐(0) 编辑
摘要:一, 1. 类的声明和创建对于 Python 函数来说,声明与定义类没什么区别,因为他们是同时进行的,定义(类体)紧跟在声明(含 class 关键字的头行[header line])和可选(但总是推荐使用)的文档字符串后面。同时,所有的方法也必须同时被定义。请注意 Python 并不支持纯虚函数(像 阅读全文
posted @ 2019-08-16 15:54 Augustone 阅读(247) 评论(0) 推荐(0) 编辑
摘要:概论: oop方法将世界看作一个有结构、有组织、有层次、有普遍联系,有属性特征、有行为方法的有机体、生命体,在oop当中对象不仅有数据和结构,而且有控制代码、行为、函数、方法,自身特征与自身行为封装到类中,实例化到具体事务当中,每个层面均有自身意义,下层可以继承上层,乃至多个上层,下层可以传承、繁衍 阅读全文
posted @ 2019-08-15 18:57 Augustone 阅读(1190) 评论(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 阅读(337) 评论(0) 推荐(0) 编辑
摘要:python -m compileall 目录 # 存放python源代码的目录 在目录下生成__pycache__目录,该目录中包含源代码对应的预编译文件.pyc python 文件.pyc 此时执行速度更快(实际上是编译更快,或者说省去了编译的步骤(但如果源程序修改则须重新编译)) 即时速度更快 阅读全文
posted @ 2019-08-14 10:10 Augustone 阅读(3048) 评论(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 阅读(3127) 评论(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 阅读(310) 评论(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 阅读(243) 评论(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 阅读(282) 评论(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 阅读(540) 评论(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 阅读(359) 评论(0) 推荐(0) 编辑
摘要:Table of Contents Python Lists Lists Are Ordered(有序) Lists Can Contain Arbitrary Objects(混杂) List Elements Can Be Accessed by Index(可索引) Lists Can Be 阅读全文
posted @ 2019-08-10 23:33 Augustone 阅读(1104) 评论(0) 推荐(0) 编辑
摘要:编程范式(Programming Paradigm)是某种编程语言典型的编程风格或者说是编程方式。随着编程方法学和软件工程研究的深入,特别是OO思想的普及,范式(Paradigm)以及编程范式等术语渐渐出现在人们面前。面向对象编程(OOP)常常被誉为是一种革命性的思想,正因为它不同于其他的各种编程范 阅读全文
posted @ 2019-08-09 12:57 Augustone 阅读(574) 评论(0) 推荐(0) 编辑
摘要:1,anaconda有64位和32位两个版本,支持主流操作系统 2,可在清华镜像网站下载(曾经终止过,现在已经恢复) 3,下载安装后要装插件,可以是通过nbextensions(参见:https://blog.csdn.net/August1226/article/details/80762632) 阅读全文
posted @ 2019-08-09 11:42 Augustone 阅读(228) 评论(0) 推荐(0) 编辑
摘要:Strings are amongst the most popular types(最常用的类型) in Python. We can create them simply by enclosing characters in quotes(引号引起来). Python treats single 阅读全文
posted @ 2019-08-08 15:13 Augustone 阅读(496) 评论(0) 推荐(0) 编辑
摘要:Operators(运算符) are the constructs which can manipulate the value of operands. Consider the expression 4 + 5 = 9. Here, 4 and 5 are called operands and 阅读全文
posted @ 2019-08-08 14:14 Augustone 阅读(1514) 评论(0) 推荐(0) 编辑
摘要:Python 风格规范(Google) 本项目并非 Google 官方项目, 而是由国内程序员凭热情创建和维护。 如果你关注的是 Google 官方英文版, 请移步 Google Style Guide 以下代码中 Yes 表示推荐,No 表示不推荐。 分号 不要在行尾加分号, 也不要用分号将两条命 阅读全文
posted @ 2019-08-07 17:11 Augustone 阅读(197) 评论(0) 推荐(0) 编辑
摘要:今天内容:python3-basic-operators.html ******************************************************** 什么是运算符? 本章节主要说明Python的运算符。举个简单的例子 4 +5 = 9 。 例子中,4 和 5 被称为操 阅读全文
posted @ 2019-08-03 15:03 Augustone 阅读(516) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示