![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python面向对象编程
文章平均质量分 68
Python面向对象编程遇到的知识点梳理记忆
赵孝正
python爱好者
展开
-
python编程之观察者模式
python编程之观察者模式原创 2024-01-14 19:17:07 · 965 阅读 · 0 评论 -
PyQt5(二) python程序打包成.exe文件
python 程序打包成 .exe 文件原创 2023-02-28 10:50:38 · 1068 阅读 · 0 评论 -
Python代码使用PyQt5制作界面并封装
Python代码使用PyQt5制作界面并封装原创 2023-02-28 10:37:17 · 2347 阅读 · 0 评论 -
Python 23 种代码设计模式
Python 23 种代码设计模式原创 2023-01-16 13:35:29 · 261 阅读 · 0 评论 -
算法设计模式简介
算法设计模式简介原创 2022-09-22 09:43:12 · 297 阅读 · 0 评论 -
python类方法介绍
python类方法原创 2022-08-19 09:11:41 · 148 阅读 · 0 评论 -
Python中的{:02d}是什么意思
python中{:02d}是什么意思原创 2022-06-12 21:39:00 · 7780 阅读 · 0 评论 -
Python中__all__变量的用法
Python中__all__变量的用法原创 2022-06-10 16:46:46 · 251 阅读 · 0 评论 -
pyminifier加密方法加密Python代码报错IndentationError: unexpected indent
将使用 pyminifier 方法加密的 Python 代码放在 PyCharm 运行后,出现如下错误:这种错误常常出现在缩进不规则的时候运行py文件,提示:IndentationError: unexpected indent,提示在第3行遇到非预期的缩进。问题分析:在加密前,代码是可以正常运行的,这说明,代码的加密策略有 bug,改变了代码的正常运行。参考链接:[1] Python错误集锦:IndentationError: unexpected indent 2020.8.........原创 2022-06-06 14:01:12 · 449 阅读 · 2 评论 -
python中的token是什么
基本概念Token 的中文意思是“令牌”。主要用来身份验证。 Facebook,Twitter,Google+,Github 等大型网站都在使用。比起传统的身份验证方法,Token 有扩展性强,安全性高的特点,非常适合用在 Web 应用或者移动应用上。参考链接:[1] token的介绍和用python 生成token的几种方法 2016.12...原创 2022-06-06 13:23:25 · 1101 阅读 · 0 评论 -
详解python的logging模块
使用python文件将输出信息写入到文件中原创 2022-06-05 18:59:31 · 2475 阅读 · 2 评论 -
Python使用requests模块发送HTTP请求使用举例
python requests模块应用实例原创 2022-06-03 18:30:23 · 1106 阅读 · 0 评论 -
Python的super()函数
super()使用方法介绍原创 2022-06-03 18:01:15 · 496 阅读 · 1 评论 -
python特殊方法之__str__
定义__str__()方法:总结:参考链接[1] 链接1 2022.6原创 2022-06-03 17:30:41 · 1782 阅读 · 1 评论 -
如何使用 python 特殊方法__getitem__和__len__
首先,我们用 collections.namedtuple 构建了一个简单的类来表示一张纸牌。(namedtuple 用以构建只有少数属性但是没有方法的对象,比如数据库条目。)如下所示,利用 namedtuple ,我们可以很轻松地得到一个纸牌对象:__len__方法FrenchDeck 这个类,可以用 len() 函数来查看一叠牌有多少张:__getitem__方法通过 __getitem__方法, 可以实现:从一叠牌中抽取特定的一张纸牌,比如说第一张或最后一张,是很容易的:deck[0] 或 d原创 2022-06-03 17:10:25 · 306 阅读 · 1 评论 -
UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x80 in position 167: illegal multibyte sequence
UnicodeDecodeError原创 2022-06-02 09:38:18 · 697 阅读 · 0 评论 -
pyminifier 方法加密、混淆Python代码
pyminifier加密、混淆python代码原创 2022-06-01 16:00:09 · 3831 阅读 · 0 评论 -
Python 代码加密方法总结
Python 代码加密原创 2022-06-01 10:20:52 · 2404 阅读 · 0 评论 -
from typing import Dict, Tuple, List, Optional
python的Typing模块介绍原创 2022-05-29 16:53:26 · 14194 阅读 · 2 评论 -
Python的 @property装饰器和@setter装饰器和@functools.wraps(func)装饰器
python装饰器原创 2022-05-27 21:47:18 · 1054 阅读 · 3 评论 -
Python普通方法、静态方法、类方法的区别
开始:创建类和方法# -*-coding:utf-8-*-# 普通方法,类方法,静态方法的区别__metaclass__ = typeclass Tst: name = 'tst' data = 'this is data' # 普通方法 def normalMethod(self, name): print(self.data, name) # 类方法,可以访问类属性 @classmethod def clas.原创 2022-05-10 21:35:39 · 269 阅读 · 0 评论