随笔分类 -  Python

摘要:1、代码编辑快捷键 序号 快捷键 作用 1 CTRL + ALT + SPACE 快速导入任意类 2 CTRL + SHIFT + ENTER 代码补全 3 SHIFT + F1 查看外部文档 4 CTRL + Q 快速查找文档 5 CTRL + P 参数信息(在方法中调用的参数) 6 CTRL + 阅读全文
posted @ 2022-08-06 16:06 Sundance8866 阅读(574) 评论(0) 推荐(0)
摘要:Py西游攻关之IO model - Yuan先生 - 博客园 (cnblogs.com) https://www.cnblogs.com/yuanchenqi/articles/5722574.html 事件驱动模型 上节的问题: 协程:遇到IO操作就切换。 但什么时候切回去呢?怎么确定IO操作完了 阅读全文
posted @ 2022-01-24 09:17 Sundance8866 阅读(318) 评论(0) 推荐(0)
摘要:Py西游攻关之IO model - Yuan先生 - 博客园 (cnblogs.com) 事件驱动模型 上节的问题: 协程:遇到IO操作就切换。 但什么时候切回去呢?怎么确定IO操作完了? 传统的编程是如下线性模式的: 开始 >代码块A >代码块B >代码块C >代码块D >...... >结束 每 阅读全文
posted @ 2021-06-27 12:47 Sundance8866 阅读(64) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/yuanchenqi/articles/6248025.html 操作系统 一 为什么要有操作系统? 现代计算机系统是由一个或者多个处理器,主存,磁盘,打印机,键盘,鼠标显示器,网络接口以及各种其他输入 输出设备组成的复杂系统,每位程序员不可能掌握所有 阅读全文
posted @ 2020-07-11 09:42 Sundance8866 阅读(161) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/weiwangchao_/article/details/80395941 python中的struct主要是用来处理C结构数据的,读入时先转换为Python的字符串类型,然后再转换为Python的结构化类型,比如元组(tuple)啥的~。一般输入的渠道来 阅读全文
posted @ 2020-05-27 20:59 Sundance8866 阅读(977) 评论(0) 推荐(0)
摘要:iter: def iter(source, sentinel=None): # known special case of iter """ iter(iterable) -> iterator iter(callable, sentinel) -> iterator Get an iterato 阅读全文
posted @ 2020-05-21 20:56 Sundance8866 阅读(211) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/5937962.html 一.操作系统基础 操作系统:(Operating System,简称OS)是管理和控制计算机硬件与软件资源的计算机程序,是直接运行在“裸机”上的最基本的系统软件,任何其他软件都必须在操作 阅读全文
posted @ 2020-05-18 21:05 Sundance8866 阅读(188) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/6129246.html 一 客户端/服务器架构 1.硬件C/S架构(打印机) 2.软件C/S架构 互联网中处处是C/S架构 如黄色网站是服务端,你的浏览器是客户端(B/S架构也是C/S架构的一种) 腾讯作为服务 阅读全文
posted @ 2020-05-06 21:12 Sundance8866 阅读(156) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/6232220.html 一 什么是异常 异常就是程序运行时发生错误的信号(在程序出现错误时,则会产生一个异常,若程序没有处理它,则会抛出该异常,程序的运行也随之终止),在python中,错误触发的异常如下 而错 阅读全文
posted @ 2020-05-06 20:52 Sundance8866 阅读(115) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/8029564.html 一 前言 元类属于python面向对象编程的深层魔法,99%的人都不得要领,一些自以为搞明白元类的人其实也只是自圆其说、点到为止,从对元类的控制上来看就破绽百出、逻辑混乱,今天我就来带大 阅读全文
posted @ 2020-05-02 12:53 Sundance8866 阅读(158) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/6204014.html 五 __getattribute__ 回顾__getattr__ class Foo: def __init__(self,x): self.x=x def __getattr__(se 阅读全文
posted @ 2020-04-25 12:11 Sundance8866 阅读(157) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/6204014.html 一 isinstance(obj,cls)和issubclass(sub,super) isinstance(obj,cls)检查是否obj是否是类 cls 的对象 class Foo( 阅读全文
posted @ 2020-04-21 21:03 Sundance8866 阅读(129) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/7340687.html 一 多态 多态指的是一类事物有多种形态 动物有多种形态:人,狗,猪 import abc class Animal(metaclass=abc.ABCMeta): #同一类事物:动物 @ 阅读全文
posted @ 2020-04-20 20:18 Sundance8866 阅读(182) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/6182264.html https://www.cnblogs.com/linhaifeng/articles/7340801.html#_label4 静态属性 特性(property) 什么是特性prope 阅读全文
posted @ 2020-04-18 22:53 Sundance8866 阅读(239) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/6182264.html 可参考下记 https://www.cnblogs.com/wupeiqi/p/4493506.html https://www.cnblogs.com/wupeiqi/p/476680 阅读全文
posted @ 2020-04-12 21:23 Sundance8866 阅读(250) 评论(0) 推荐(0)
摘要:cal.py #!/usr/bin/env python # -*- coding:utf8 -*- import re def calculation(x,y,m): if m=='+' or m=='--': return x+y elif m=="-" or m=='+-' or m=='-+ 阅读全文
posted @ 2020-04-11 22:58 Sundance8866 阅读(174) 评论(0) 推荐(0)
摘要:原文地址:http://blog.csdn.net/zanfeng/article/details/52164124 / https://www.cnblogs.com/hokky/p/8434236.html 使用print输出各型的 字符串 整数 浮点数 出度及精度控制 1 2 3 4 strH 阅读全文
posted @ 2020-04-07 19:40 Sundance8866 阅读(640) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/yuanchenqi/articles/5732581.html https://www.cnblogs.com/linhaifeng/articles/6384466.html#_label2 一 time与datetime模块 在Python中,通 阅读全文
posted @ 2020-04-06 12:22 Sundance8866 阅读(176) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/linhaifeng/articles/6379069.html https://www.cnblogs.com/yuanchenqi/articles/5732581.html 一 模块介绍 1、什么是模块? 大家之前在编写ATM作业时,思路是先将程 阅读全文
posted @ 2020-04-05 22:17 Sundance8866 阅读(383) 评论(0) 推荐(0)
摘要:文件重命名(修改后保存) import os # os.rename('a.txt','a.txt.bak') os.rename('b.txyt','a.txt') tag用法 (退出层级,tag用来退回根部) tag=True while tag: print('leve1') choice=i 阅读全文
posted @ 2020-04-05 21:36 Sundance8866 阅读(379) 评论(0) 推荐(0)