From 7b7222e03e027ca4d4fe222de8c3354f1f2e6781 Mon Sep 17 00:00:00 2001 From: sz <501562071@qq.com> Date: Fri, 2 Feb 2018 21:39:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=9D=A2=E5=90=91=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xx.jpg" | Bin 0 -> 1372 bytes .../xx2.jpg" | Bin 0 -> 1372 bytes ...02345円270円270円346円246円202円345円277円265円.py" | 154 ++++ .../other1.py" | 5 + .../other2.py" | 5 + .../other3.py" | 5 + .../test.py" | 0 ...1346円200円247円-346円241円210円344円276円213円.py" | 205 +++++ .../345円244円232円346円200円201円.py" | 65 ++ .../345円260円201円350円243円205円.py" | 61 ++ .../347円273円247円346円211円277円.py" | 735 ++++++++++++++++++ ...05345円255円230円347円256円241円347円220円206円.py" | 213 +++++ .../classDesc.html" | 67 ++ .../classDesc.py" | 34 + .../other.py" | 6 + ...77347円224円250円346円226円271円345円274円217円.py" | 106 +++ ...6346円200円247,円350円247円204円345円276円213円.py" | 32 + ...52350円257円273円345円261円236円346円200円247円.py" | 52 ++ ...36344円276円213円346円226円271円346円263円225円.py" | 23 + ...37345円221円275円345円221円250円346円234円237円.py" | 46 ++ ...36346円200円247円347円233円270円345円205円263円.py" | 182 +++++ ...14347円273円217円345円205円270円347円261円273円.py" | 12 + ...0345円205円263円-350円241円245円345円205円205円.py" | 661 ++++++++++++++++ ...71346円263円225円347円233円270円345円205円263円.py" | 44 ++ ...11345円214円226円345円261円236円346円200円247円.py" | 37 + ...24347円224円250円345円234円272円346円231円257円.py" | 37 + .../347円261円273円346円226円271円346円263円225円.py" | 22 + ...73347円232円204円345円256円232円344円271円211円.py" | 41 + ...73347円232円204円350円241円245円345円205円205円.py" | 104 +++ ...56347円232円204円345円261円236円346円200円247円.py" | 31 + ...74345円220円210円346円241円210円344円276円213円.py" | 483 ++++++++++++ ...31346円200円201円346円226円271円346円263円225円.py" | 14 + 32 files changed, 3482 insertions(+) create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx.jpg" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx2.jpg" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/test.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" create mode 100644 "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx.jpg" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..19d6b700d9f7b59dbd16b6809dd6a4af6c776943 GIT binary patch literal 1372 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<Ydm>HEAm;@P_1sVSzVUTBFU}Ocl7UW4 zD%dK(z{JSR%*4XX%F4n5R9y>{XJ8Rz6;d>GWD^cdWLGK_F>0K+kVDyN<3z7&iyu^s zlZu)+xx~aJB&Af<)ho7@(s#)lOnKGb1qam<1w^8gioj(pbqrj;d*vt-4anxtpb3vx<4l#swqs zlQbZwOfTcCstD`xK;K0TJ6>sS39xPz33OC+6$xOZ7|X7}bOw^MSl@d3z4i3S<#g56 zHP~=V(^r*=OJh-k_*Px@EKL!SErGKbG&zb zB-V*c&w4HeI=mAJbOoCZw4o8`Lx(0Lhd{zA%8Nl`Q5P6nUvw4W0diP?x)`wHEmH!R zE;f6*GV@5qNLeoaxIjn3WQX09DQOMj?3a4vy?o|J8D+8_Su}0Z3|6eRAz~;A?7$eP z-5@KOL5>7z1K~qJhdLrfg<;0xts)flwokuqb?2-~5mpeqZ= zw;+R#zID|VX;0Kxx~PFqQ?sZx2IVpq`Bn*MT5YTj0)mR`f z1t|=yx~wl}^2A)6<)zv6c*t3)rlvip52`k&&d%2n2*jbfsvy@l@ld7v+pf0ro{owo zOP0!JFxX~l*k(Y|1zZFe_26LERTT+fx`bpOFfbtDzj!TBMh@s52zN`M0|zisF#Nv> E0KfjX-v9sr literal 0 HcmV?d00001 diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx2.jpg" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx2.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..19d6b700d9f7b59dbd16b6809dd6a4af6c776943 GIT binary patch literal 1372 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<Ydm>HEAm;@P_1sVSzVUTBFU}Ocl7UW4 zD%dK(z{JSR%*4XX%F4n5R9y>{XJ8Rz6;d>GWD^cdWLGK_F>0K+kVDyN<3z7&iyu^s zlZu)+xx~aJB&Af<)ho7@(s#)lOnKGb1qam<1w^8gioj(pbqrj;d*vt-4anxtpb3vx<4l#swqs zlQbZwOfTcCstD`xK;K0TJ6>sS39xPz33OC+6$xOZ7|X7}bOw^MSl@d3z4i3S<#g56 zHP~=V(^r*=OJh-k_*Px@EKL!SErGKbG&zb zB-V*c&w4HeI=mAJbOoCZw4o8`Lx(0Lhd{zA%8Nl`Q5P6nUvw4W0diP?x)`wHEmH!R zE;f6*GV@5qNLeoaxIjn3WQX09DQOMj?3a4vy?o|J8D+8_Su}0Z3|6eRAz~;A?7$eP z-5@KOL5>7z1K~qJhdLrfg<;0xts)flwokuqb?2-~5mpeqZ= zw;+R#zID|VX;0Kxx~PFqQ?sZx2IVpq`Bn*MT5YTj0)mR`f z1t|=yx~wl}^2A)6<)zv6c*t3)rlvip52`k&&d%2n2*jbfsvy@l@ld7v+pf0ro{owo zOP0!JFxX~l*k(Y|1zZFe_26LERTT+fx`bpOFfbtDzj!TBMh@s52zN`M0|zisF#Nv> E0KfjX-v9sr literal 0 HcmV?d00001 diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" new file mode 100644 index 0000000..e231188 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" @@ -0,0 +1,154 @@ +# _*_ coding:utf-8 _*_ +# 1 / 0 +# ZeroDivisionError +# def divide(x, y): +# if y != 0: +# return x / y +# print("除数不能为0, 请仔细检查") +# return 0 +# +# +# print(divide(1, 0)) +# +# if name != None: +# print(name) +# NameError + + +# print(name) +# print("123") + + + +# try: +# print(name) +# except NameError: +# print("名称有问题, 请仔细检查") + + +# try: +# # 1 / 0 +# print(name) +# except ZeroDivisionError as ze: +# print("xxx", ze) +# except NameError as ne: +# print("名称错误", ne) +# else: +# print("123") +# finally: +# print("最后执行的内容, 到时候, 不管是否会出现异常, 都会执行的语句") + + +# try: +# 1 / 0 +# # print(name) +# except Exception as e: +# print("xxx", e) +# else: +# print("123") +# finally: +# print("最后执行的内容, 到时候, 不管是否会出现异常, 都会执行的语句") + +# try: +# f = open("xx.jpg", "r") +# f.readlines() +# except Exception as e: +# print(e) +# finally: +# print("xxxx") +# f.close() + +# with open("xx.jpg", "r") as f: +# f.readlines() + + +# class Test: +# def __enter__(self): +# print("enter") +# return self +# +# def __exit__(self, exc_type, exc_val, exc_tb): +# print(self, exc_type, exc_val, exc_tb) +# import traceback +# print(traceback.extract_tb(exc_tb)) +# print("exit") +# return True +# +# with Test() as x: +# # print("body", x) +# 1 / 0 + + +import contextlib + + +class Test: + def t(self): + print("tttttt") + + def close(self): + print("资源释放") + + # def __enter__(self): + # return self + # + # def __exit__(self, exc_type, exc_val, exc_tb): + # self.close() +# import contextlib +# with contextlib.closing(Test()) as t_obj: +# t_obj.t() + + +# with open("xx.jpg", "rb") as from_file: +# with open("xx2.jpg", "wb") as to_file: +# from_contents = from_file.read() +# to_file.write(from_contents) +# with open("xx.jpg", "rb") as from_file, open("xx2.jpg", "wb") as to_file: +# from_contents = from_file.read() +# to_file.write(from_contents) +# import contextlib +# with contextlib.nested(open("xx.jpg", "rb"), open("xx2.jpg", "wb")) as (from_file, to_file): +# from_contents = from_file.read() +# to_file.write(from_contents) + +class LessZero(Exception): + def __init__(self, msg, error_code): + self.msg = msg + self.ec = error_code + + def __str__(self): + return self.msg + str(self.ec) + pass + + +def set_age(age): + if age <=0 or age> 200: + # print("值错误") + raise LessZero("小于零, 错误", 404) + else: + print("给张三的年龄设置为", age) + + +try: + set_age(-18) +except LessZero as e: + print("x", e) + + + + + + + + + + + + + + + + + + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" new file mode 100644 index 0000000..6c6864e --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" @@ -0,0 +1,5 @@ +from 封装 import Caculator + + +c1 = Caculator(0) +c1.jia(6).jian(3).show() \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" new file mode 100644 index 0000000..6c6864e --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" @@ -0,0 +1,5 @@ +from 封装 import Caculator + + +c1 = Caculator(0) +c1.jia(6).jian(3).show() \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" new file mode 100644 index 0000000..6c6864e --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" @@ -0,0 +1,5 @@ +from 封装 import Caculator + + +c1 = Caculator(0) +c1.jia(6).jian(3).show() \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/test.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/test.py" new file mode 100644 index 0000000..e69de29 diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" new file mode 100644 index 0000000..813056b --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" @@ -0,0 +1,205 @@ +# 定义三个类, 小狗, 小猫, 人 +# 小狗: 姓名, 年龄(默认1岁); 吃饭, 玩, 睡觉, 看家(格式: 名字是xx, 年龄xx岁的小狗在xx) +# 小猫: 姓名, 年龄(默认1岁); 吃饭, 玩, 睡觉, 捉老鼠(格式: 名字是xx, 年龄xx岁的小猫在xx) +# 人: 姓名, 年龄(默认1岁), 宠物; 吃饭, 玩, 睡觉(格式: 名字是xx, 年龄xx岁的人在xx) +# 养宠物(让所有的宠物吃饭, 玩, 睡觉), +# 让宠物工作(让所有的宠物根据自己的职责开始工作) + +class Animal: + def __init__(self, name, age=1): + self.name = name + self.age = age + + def eat(self): + print("%s在吃饭" % self) + + def play(self): + print("%s在玩" % self) + + def sleep(self): + print("%s在睡觉" % self) + +class Person(Animal): + # 在创建一个小狗实例的时候, 给它设置几个属性 + def __init__(self, name, pets, age=1): + super(Person, self).__init__(name, age) + self.pets = pets + + def yang_pets(self): + for pet in self.pets: + pet.eat() + pet.play() + pet.sleep() + + def make_pets_work(self): + for pet in self.pets: + pet.work() + # if isinstance(pet, Dog): + # pet.watch() + # elif isinstance(pet, Cat): + # pet.catch() + + def __str__(self): + return "名字是{}, 年龄{}岁的人".format(self.name, self.age) +# p = Person("sz", [1, 2], 18) +# print(p.__dict__) +class Cat(Animal): + + def work(self): + print("%s在捉老鼠" % self) + + def __str__(self): + return "名字是{}, 年龄{}岁的小猫".format(self.name, self.age) + +class Dog(Animal): + def work(self): + print("%s在看家" % self) + + def __str__(self): + return "名字是{}, 年龄{}岁的小狗".format(self.name, self.age) + +d = Dog("小黑", 18) +c = Cat("小红", 2) +p = Person("sz", [d, c], 18) +p.yang_pets() +p.make_pets_work() +# -----------------------------------------代码3------------------------------------------------- +# +# class Person: +# # 在创建一个小狗实例的时候, 给它设置几个属性 +# +# def __init__(self, name, pets, age=1): +# self.name = name +# self.age = age +# self.pets = pets +# +# def eat(self): +# print("%s在吃饭" % self) +# +# def play(self): +# print("%s在玩" % self) +# +# def sleep(self): +# print("%s在睡觉" % self) +# +# def yangPets(self): +# for pet in self.pets: +# pet.eat() +# pet.play() +# pet.sleep() +# +# def make_pets_work(self): +# for pet in self.pets: +# pet.work() +# # if isinstance(pet, Dog): +# # pet.watch() +# # elif isinstance(pet, Cat): +# # pet.catch() +# +# def __str__(self): +# return "名字是{}, 年龄{}岁的人".format(self.name, self.age) +# +# class Cat: +# # 在创建一个小狗实例的时候, 给它设置几个属性 +# def __init__(self, name, age=1): +# self.name = name +# self.age = age +# +# def eat(self): +# print("%s在吃饭" % self) +# +# def play(self): +# print("%s在玩" % self) +# +# def sleep(self): +# print("%s在睡觉" % self) +# +# def work(self): +# print("%s在捉老鼠" % self) +# +# def __str__(self): +# return "名字是{}, 年龄{}岁的小猫".format(self.name, self.age) +# +# class Dog: +# # 在创建一个小狗实例的时候, 给它设置几个属性 +# def __init__(self, name, age=1): +# self.name = name +# self.age = age +# +# def eat(self): +# print("%s在吃饭" % self) +# +# def play(self): +# print("%s在玩" % self) +# +# def sleep(self): +# print("%s在睡觉" % self) +# +# def work(self): +# print("%s在看家" % self) +# +# def __str__(self): +# return "名字是{}, 年龄{}岁的小狗".format(self.name, self.age) +# +# d = Dog("小黑", 18) +# c = Cat("小红", 2) +# p = Person("sz", [d, c], 18) +# p.yangPets() +# p.make_pets_work() + + + + + + + +# -----------------------------------------代码2------------------------------------------------- +# class Dog: +# # 在创建一个小狗实例的时候, 给它设置几个属性 +# def __init__(self, name, age=1): +# self.name = name +# self.age = age +# +# def eat(self): +# print("%s在吃饭" % self) +# +# def play(self): +# print("%s在玩" % self) +# +# def sleep(self): +# print("%s在睡觉" % self) +# +# def watch(self): +# print("%s在看家" % self) +# +# def __str__(self): +# return "名字是{}, 年龄{}岁的小狗".format(self.name, self.age) +# +# d = Dog("小黑", 18) +# d.address = "xxx" +# d.eat() +# d.play() + + +# -----------------------------------------代码1------------------------------------------------- +# class Dog: +# # 在创建一个小狗实例的时候, 给它设置几个属性 +# def __init__(self, name, age=1): +# self.name = name +# self.age = age +# +# def eat(self): +# print("名字是{}, 年龄{}岁的小狗在吃饭".format(self.name, self.age)) +# +# def play(self): +# print("名字是{}, 年龄{}岁的小狗在玩".format(self.name, self.age)) +# +# def sleep(self): +# print("名字是{}, 年龄{}岁的小狗在睡觉".format(self.name, self.age)) +# +# def watch(self): +# print("名字是{}, 年龄{}岁的小狗在看家".format(self.name, self.age)) +# +# +# d = Dog("小黑", 18) +# d.eat() diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" new file mode 100644 index 0000000..784686c --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" @@ -0,0 +1,65 @@ + +# --------------------------------------多态------------------------------------- + +import abc + +class Animal(object, metaclass=abc.ABCMeta): + @abc.abstractmethod + def jiao(self): + pass + + @abc.abstractclassmethod + def test(cls): + pass + +class Dog(Animal): + def jiao(self): + print("汪汪汪") + + @classmethod + def test(cls): + print("xxxxx") + pass + +class Cat(Animal): + def jiao(self): + print("喵喵喵") + + +def test(obj): + obj.jiao() + +d = Dog() +d.jiao() +d.test() + +# a = Animal() +# a.jiao() +# d = Dog() +# d.hehe() +# c = Cat() +# test(d) + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" new file mode 100644 index 0000000..93412cd --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" @@ -0,0 +1,61 @@ +# _*_ encoding:utf-8 _*_ +# import win32com.client +# +# +class Caculator(object): + def __check_num_zsq(func): + def inner(self, n): + if not isinstance(n, int): + raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") + return func(self, n) + return inner + + def __say(self, word): + # 1. 创建一个播报器对象 + speaker = win32com.client.Dispatch("SAPI.SpVoice") + # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 + speaker.Speak(word) + + def __create_say_zsq(word=""): + def __say_zsq(func): + def inner(self, n): + self.__say(word + str(n)) + return func(self, n) + return inner + return __say_zsq + + @__check_num_zsq + @__create_say_zsq() + def __init__(self, num): + self.__result = num + + @__check_num_zsq + @__create_say_zsq("加") + def jia(self, n): + self.__result += n + return self + + @__check_num_zsq + @__create_say_zsq("减去") + def jian(self, n): + self.__result -= n + return self + + @__check_num_zsq + @__create_say_zsq("乘以") + def cheng(self, n): + self.__result *= n + return self + + def show(self): + self.__say("sz牌计算机计算的结果是:%d" % self.__result) + print("计算的结果是:%d" % self.__result) + return self + + def clear(self): + self.__result = 0 + return self + + @property + def result(self): + return self.__result diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" new file mode 100644 index 0000000..730b7a2 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" @@ -0,0 +1,735 @@ +# _*_ encoding:utf-8 _*_ +# class Animal: +# pass +# +# class xxx: +# pass +# +# class Dog(Animal, xxx): +# pass +# +# +# d = Dog() +# +# print(d.__class__) +# print(Dog.__class__) +# print(type.__class__) +# print(object.__class__) + +# print(Dog.__bases__) +# print(Animal.__bases__) +# # object +# +# print(int.__bases__) +# print(float.__bases__) +# print(bool.__bases__) +# +# type + + +# ---------------------------------------继承-资源--------------------------------------------- + + + +# class Animal: +# # 属性 和方法 +# # 设置不同权限的属性和方法, 继承当中, 进行测试 +# # 在子类当中, 能否访问到这些资源 +# a = 1 +# _b = 2 +# __c = 3 +# +# def t1(self): +# print("t1") +# +# def _t2(self): +# print("t2") +# +# def __t3(self): +# print("t3") +# +# def __init__(self): +# print("init, Animal") +# +# +# class Person(Animal): +# def test(self): +# print(id(self.a)) +# print(self.a) +# print(self._b) +# # print(self.__c) +# +# self.t1() +# self._t2() +# # self.__t3() +# self.__init__() +# +# p = Person() +# p.test() +# +# print(id(Animal.a)) +# p.test() + + + +# +# class B: +# age = 10 +# +# +# class A(B): +# pass +# +# +# print(A.age) +# A.age = 9 +# +# print(A.age) + +# print(B.age) +# print(A.__dict__) +# print(B.__dict__) + + +# ------------------------继承-资源的访问顺序-2.1版本--------------------------------------- + +# +# class C: +# # age = "c" +# pass +# +# class B(C): +# # age = "b" +# pass +# +# class A(B): +# # age = "a" +# pass +# +# # A -> B -> C +# print A.age + + + +# class E: +# age = "e" +# +# class D: +# # age = "d" +# pass +# +# class C(E): +# # age = "c" +# pass +# +# class B(D): +# # age = "b" +# pass +# +# class A(B, C): +# # age = "a" +# pass +# +# print A.age + +# A -> B -> D -> C -> E + + + +# +# class D: +# # age = "d" +# pass +# +# class C(D): +# age = "c" +# pass +# +# class B(D): +# # age = "b" +# pass +# +# class A(B, C): +# # age = "a" +# pass +# +# print A.age +# A -> B -> D -> C + + +# ------------------------继承-资源的访问顺序-2.2版本--------------------------------------- + +import inspect + +# class C(object): +# age = "c" +# pass +# +# class B(C): +# # age = "b" +# pass +# +# class A(B): +# # age = "a" +# pass +# +# # A -> B -> C +# print A.age +# print inspect.getmro(A) + +# +# class E(object): +# age = "e" +# +# class D(object): +# # age = "d" +# pass +# +# class C(E): +# # age = "c" +# pass +# +# class B(D): +# # age = "b" +# pass +# +# class A(B, C): +# # age = "a" +# pass +# +# print A.age +# +# print inspect.getmro(A) + +# A -> B -> D -> C -> E + + + + +# class D(object): +# age = "d" +# pass +# +# class C(D): +# age = "c" +# pass +# +# class B(D): +# # age = "b" +# pass +# +# class A(B, C): +# # age = "a" +# pass +# +# print A.age +# print inspect.getmro(A) +# A -> B -> D -> C + + + + +# ------------------------继承-资源的访问顺序-2.2版本算法问题--------------------------------------- + + + +# class D(object): +# pass +# +# class B(D): +# pass +# +# class C(B): +# pass +# +# class A(B, C): +# pass +# +# +# import inspect +# +# print inspect.getmro(A) + + +# ------------------------继承-资源的访问顺序-2.3-2.7 C3算法--------------------------------------- + +# 两个公式 +# L(object) = [object] +# L(子类(父类1, 父类2)) = [子类] + merge(L(父类1), L(父类2) , [父类1, 父类2]) +# 注意 +# + 代表合并列表 +# merge算法 +# 1. 第一个列表的第一个元素 +# 是后续列表的第一个元素 +# 或者 +# 后续列表中没有再次出现 +# 则将这个元素合并到最终的解析列表中 +# 并从当前操作的所有列表中删除 +# 2. 如果不符合,则跳过此元素,查找下一个列表的第一个元素,重复1的判断规则 +# 3. 如果最终无法把所有元素归并到解析列表, 则报错 + +# class D(object): +# pass + +# L(D(object)) = [D] + merge(L(object), [object]) +# = [D] + merge([object], [object]) +# = [D, object] + merge([], []) +# = [D, object] + +# class B(D): +# pass + +# L(B(D)) = [B] + merge(L(D), [D]) +# = [B] + merge([D, object], [D]) +# = [B, D] + merge([object], []) +# = [B, D, object] + merge([], []) +# = [B, D, object] + + +# class C(D): +# pass +# L(C(D)) = [C, D, object] + +# class A(B, C): +# pass +# L(A) = [A] + merge(L(B), L(C), [B, C]) +# = [A] + merge([B, D, object], [C, D, object], [B, C]) +# = [A, B] + merge([D, object], [C, D, object], [C]) +# = [A, B, C] + merge([D, object], [D, object]) +# = [A, B, C, D] + merge([object], [object]) +# = [A, B, C, D, object] + merge([], []) +# = [A, B, C, D, object] + +# import inspect +# +# print inspect.getmro(A) + + +# ------------------------继承-资源的访问顺序-2.3-2.7 C3算法识别问题继承------------------------------------- + +# +# class D(object): +# pass +# # L(D) = [D] + merge(L(object), [object]) +# # = [D] + merge([object], [object]) +# # = [D, object] + merge([], []) +# # = [D, object] +# +# class B(D): +# pass +# +# # L(B) = [B] + merge(L(D), [D]) +# # = [B] + merge([D, object], [D]) +# # = [B, D] + merge([object]) +# # = [B, D, object] +# +# class C(D): +# pass +# # L(C) = [C] + merge(L(B) + [B]) +# # L(C) = [C] + merge([B, D, object] + [B]) +# # L(C) = [C, B] + merge([D, object]) +# # L(C) = [C, B, D, object] + merge([]) +# # L(C) = [C, B, D, object] +# +# class A(B, C): +# pass +# + +# L(A) = [A] + merge(L(B), L(C), [B, C]) +# L(A) = [A] + merge([B, D, object], [C, B, D, object], [B, C]) +# L(A) = [A] + merge([B, D, object], [C, B, D, object], [B, C]) + +# import inspect +# inspect.getmro() +# +# B.__mro__ +# B.mro() + + +# ------------------------继承-资源的覆盖------------------------------------- + + + +# class D(object): +# age = "d" +# pass +# +# class C(D): +# age = "c" +# def test(self): +# print("c") +# pass +# +# class B(D): +# age = "b" +# def test(self): +# print self +# # print("b") +# @classmethod +# def test2(cls): +# print cls +# pass +# +# class A(B, C): +# pass +# +# A.test2() +# a = A() +# a.test() + + +# print(A.mro()) +# +# print(A.age) +# print(A().test()) + + +# ------------------------------继承-资源的累加------------------------------------- + + + +# +# class B: +# a = 1 +# def __init__(self): +# self.b = 2 +# +# def t1(self): +# print("t1") +# +# @classmethod +# def t2(cls): +# print("t2") +# +# @staticmethod +# def t3(): +# print("t3") +# +# +# class A(B): +# c = 3 +# def __init__(self): +# self.e = "666" +# +# def tt1(self): +# print("t1") +# +# @classmethod +# def tt2(cls): +# print("t2") +# +# @staticmethod +# def tt3(): +# print("t3") +# +# pass +# +# +# a_obj = A() +# +# print(A.a) +# print(a_obj.b) +# +# +# a_obj.t1() +# A.t2() +# A.t3() +# +# print(A.c) +# +# a_obj.tt1() +# A.tt2() +# A.tt3() +# +# a_obj.d = "xxx" +# print(a_obj.d) +# +# print(a_obj.e) + +# ------------------------------继承-资源的累加-2------------------------------------- + +# class B: +# a = 1 +# +# def __init__(self): +# self.b = 2 +# self.xxx = "123" +# +# def t1(self): +# print("t1") +# +# @classmethod +# def t2(cls): +# print("t2") +# +# @staticmethod +# def t3(): +# print("t3") +# +# +# class A(B): +# c = 3 +# +# def __init__(self): +# # self a_obj +# # self.init +# # b = B() +# # b.__init__() +# B.__init__(self) +# # self.b = 2 +# self.e = "666" +# +# def tt1(self): +# print("t1") +# +# @classmethod +# def tt2(cls): +# print("t2") +# +# @staticmethod +# def tt3(): +# print("t3") +# +# pass +# +# a = A() +# print(a.__dict__) + +# ------------------------------继承-资源的累加-2-存在问题------------------------------------- +# +# class B: +# a = 1 +# +# def __init__(self): +# self.b = 2 +# self.xxx = "123" +# +# def t1(self): +# print("t1") +# +# @classmethod +# def t2(cls): +# print("t2") +# +# @staticmethod +# def t3(): +# print("t3") +# +# +# class A(B): +# c = 3 +# +# def __init__(self): +# B.__init__(self) +# self.e = "666" +# +# def tt1(self): +# print("t1") +# +# @classmethod +# def tt2(cls): +# print("t2") +# +# @staticmethod +# def tt3(): +# print("t3") +# +# pass +# +# a = A() +# print(a.__dict__) + + +# class D(object): +# def __init__(self): +# print("d") +# +# class B(D): +# def __init__(self): +# D.__init__(self) +# print("b") +# +# class C(D): +# def __init__(self): +# D.__init__(self) +# print("c") +# +# class A(B, C): +# def __init__(self): +# B.__init__(self) +# C.__init__(self) +# print("a") + + +# B() +# C() +# A() + + +# ------------------------------继承-资源的累加-super使用------------------------------------- + +# class B: +# a = 1 +# +# def __init__(self): +# self.b = 2 +# self.xxx = "123" +# +# def t1(self): +# print("t1") +# +# @classmethod +# def t2(cls): +# print(cls) +# print("t2") +# +# @staticmethod +# def t3(): +# print("t3") +# +# +# class A(B): +# c = 3 +# +# def __init__(self): +# # super(A, self).__init__() +# super().__init__() +# self.e = "666" +# +# def tt1(self): +# print("t1") +# +# @classmethod +# def tt2(cls): +# super(A, cls).t2() +# print("t2") +# +# @staticmethod +# def tt3(): +# print("t3") +# +# pass +# +# a = A() +# # print(a.__dict__) +# +# A.tt2() + +# class D(object): +# def __init__(self): +# print("d") +# +# class B(D): +# def __init__(self): +# super().__init__() +# print("b") +# +# class C(D): +# def __init__(self): +# super().__init__() +# print("c") +# +# class A(B, C): +# def __init__(self): +# # B.__init__(self) +# # C.__init__(self) +# super().__init__() +# print("a") + +# ------------------------------继承-资源的累加-super使用注意事项------------------------------------- + + +# class D(object): +# def __init__(self): +# print("d") +# +# class B(D): +# def __init__(self): +# super(self.__class__, self).__init__() +# # super(A, self).__init__() +# print("b") +# +# # class C(D): +# # def __init__(self): +# # super().__init__() +# # print("c") +# # # +# class A(B): +# def __init__(self): +# super(A, self).__init__() +# print("a") +# +# +# A() + + +# class D(object): +# def __init__(self): +# print("d") +# +# class B(D): +# def __init__(self): +# # super().__init__() +# super(B, self).__init__() +# print("b") +# +# class C(D): +# def __init__(self): +# # super().__init__() +# super(C, self).__init__() +# print("c") +# +# class A(B, C): +# def __init__(self): +# # super().__init__() +# B.__init__(self) +# C.__init__(self) +# print("a") +# +# +# A() +# +# print(A.mro()) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" new file mode 100644 index 0000000..bf924d9 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" @@ -0,0 +1,213 @@ +#_*_encoding:utf-8_*_ +# class Person: +# pass +# +# p = Person() +# print(p) +# # print(id(p)) +# # print(hex(id(p))) +# +# p2 = Person() +# +# print(id(p), id(p2)) +# +# +# # 1, 2, 3 +# +# num1 = 2 +# num2 = 2 +# print(id(num1), id(num2)) +# p.name = "sz" + +# ---------------------------引用计数器-------------------------------- + +# import sys +# +# class Person: +# pass +# +# p1 = Person() # 1 +# +# print(sys.getrefcount(p1)) +# +# p2 = p1 # 2 +# +# print(sys.getrefcount(p1)) +# +# del p2 # 1 +# print(sys.getrefcount(p1)) +# +# del p1 +# print(sys.getrefcount(p1)) + + + +# ---------------------------引用计数器+1 -1 的场景举例-------------------------------- + +# import sys +# +# class Person: +# pass +# +# p_xxx = Person() # 1 +# +# print(sys.getrefcount(p_xxx)) + + +# def log(obj): +# print(sys.getrefcount(obj)) +# +# log(p_xxx) +# +# +# for attr in dir(log): +# print attr, getattr(log, attr) + + +# ---------------------------引用计数器机制-特殊场景-循环引用问题-------------------------------- + +# 内存管理机制 = 引用计数器机制 + 垃圾回收机制 +# 当一个对象, 如果被引用 + 1, 删除一个引用 : -1 0: 被自动释放 +# 循环引用 +# objgraph +# objgraph.count() 可以查看, 垃圾回收器, 跟踪的对象个数 + +# import objgraph +# +# class Person: +# pass +# +# +# class Dog: +# pass +# +# p = Person() +# d = Dog() +# +# print(objgraph.count("Person")) +# print(objgraph.count("Dog")) +# +# p.pet = d +# d.master = p +# +# # 删除 p, d之后, 对应的对象是否被释放掉 +# del p +# del d +# +# print(objgraph.count("Person")) +# print(objgraph.count("Dog")) + + + + +# ---------------------------------垃圾回收机制-如何检测"循环引用"--------------------------------------- + +# +# class Person: +# pass +# +# p = Person() +# l = [p] +# t = (p) +# # p.pet = Dog() +# +# +# +# num = True +# num.age = 10 + + +# ---------------------------------垃圾回收机制-分代回收--------------------------------------- + + +# import gc +# +# print(gc.get_threshold()) +# gc.set_threshold(200, 5, 5) +# +# print(gc.get_threshold()) + + +# ---------------------------------垃圾回收机制-触发时机--------------------------------------- + + +# 自动回收 +# +# import gc +# +# gc.disable() +# print(gc.isenabled()) +# +# gc.enable() +# +# print(gc.isenabled()) +# +# print(gc.get_threshold()) +# gc.set_threshold(1000, 15, 5) + + +# 手动回收 +# import objgraph +# import gc +# gc.disable() +# class Person: +# pass +# +# class Dog: +# pass +# +# p = Person() +# d = Dog() +# +# p.pet = d +# d.master = p +# +# +# del p +# del d +# +# gc.collect() +# +# print(objgraph.count("Person")) +# print(objgraph.count("Dog")) + + +# -----------------------------------循环引用-细节问题(版本兼容方案)--------------------------------------- +import objgraph +import gc +import weakref +# import weakref + +# 1. 定义了两个类 +class Person: + def __del__(self): + print("Person对象, 被释放了") + pass + +class Dog: + def __del__(self): + print("Dog对象, 被释放了") + pass + +# 2. 根据这两个类, 创建出两个实例对象 +p = Person() +d = Dog() + +# 3. 让两个实例对象之间互相引用, 造成循环引用 +# p.pets = {"dog": weakref.ref(d1), "cat": weakref.ref(c1)} +# weakref.WeakValueDictionary({"dog": d1, "cat": c1}) +# p.pet = d +# d.master = weakref.ref(p) +# d.master = p + +# 4. 尝试删除可到达引用之后, 测试真实对象是否有被回收 +# p.pet = None +del p +del d + +# 5. 通过"引用计数机制"无法回收; 需要借助"垃圾回收机制"进行回收 +# gc.collect() + +print(objgraph.count("Person")) +print(objgraph.count("Dog")) + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" new file mode 100644 index 0000000..9948f25 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" @@ -0,0 +1,67 @@ + + Python: module classDesc + +

Python: module classDesc

+ + + +

+
classDesc
index
c:\users\think\desktop\python核心_code\classdesc.py
+ +

+ + + + + +

+Classes
+
builtins.object +
+
+
Person +
+
+
+

+ + + + + + + +

+class Person(builtins.object)
关于这个类的描述, 类的作用, 类的构造函数等等; 类属性的描述
+Attributes:
+ count: int 代表是人的个数
Methods defined here:
+
run(self, distance, step)
这个方法的作用效果
+:param distance: 参数的含义, 参数的类型int, 是否有默认值
+:param step:
+:return: 返回的结果的含义(时间), 返回数据的类型int
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+
+
+Data and other attributes defined here:
+
count = 1
+ +

+ + + + + +

+Functions
xxx()
这是一个xxx函数, 有xxx作用
+:return:
+
+

AltStyle によって変換されたページ (->オリジナル) /

\ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" new file mode 100644 index 0000000..0e45031 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" @@ -0,0 +1,34 @@ + +class Person: + """ + 关于这个类的描述, 类的作用, 类的构造函数等等; 类属性的描述 + Attributes: + count: int 代表是人的个数 + """ + # 这个表示, 是人的个数 + count = 1 + + def run(self, distance, step): + """ + 这个方法的作用效果 + :param distance: 参数的含义, 参数的类型int, 是否有默认值 + :param step: + :return: 返回的结果的含义(时间), 返回数据的类型int + """ + print("人在跑") + return distance / step + def __init__(self): + self.__name = "sz" + +# help(Person) + +def xxx(): + """ + 这是一个xxx函数, 有xxx作用 + :return: + """ + print("xxx") + + + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" new file mode 100644 index 0000000..6a4c69c --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" @@ -0,0 +1,6 @@ +# import 私有化属性 +# +# print(私有化属性.__a) + +from 私有化属性 import * +print(__a) \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" new file mode 100644 index 0000000..e2aeaa7 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" @@ -0,0 +1,106 @@ +# _*_ encoding:utf-8 _*_ +# class Person(object): +# def __init__(self): +# self.__age = 18 +# +# +# def get_age(self): +# print("----, get") +# return self.__age +# +# def set_age(self, value): +# print("----, set") +# self.__age = value +# +# +# age = property(get_age, set_age) +# +# +# p = Person() +# print(p.age) +# +# p.age = 90 +# print(p.age) +# +# print(p.__dict__) + + +# 第二种使用方式 + +# class Person(object): +# def __init__(self): +# self.__age = 18 +# +# @property +# def age(self): +# print("----- get") +# return self.__age +# +# @age.setter +# def age(self, value): +# print("----- set") +# self.__age = value +# +# p = Person() +# print(p.age) +# +# p.age = 10 +# print(p.age) + +# -------------------------------property在经典类中的使用--------------------------------------- + +# +# class Person: +# def __init__(self): +# self.__age = 18 +# +# +# def get_age(self): +# print("----, get") +# return self.__age +# +# def set_age(self, value): +# print("----, set") +# self.__age = value +# +# +# age = property(get_age, set_age) +# +# +# p = Person() +# print p.age +# +# p.age = 19 +# print p.age +# +# print p.__dict__ + + + + +class Person: + def __init__(self): + self.__age = 18 + + @property + def age(self): + print "-----get" + return self.__age + + @age.setter + def age(self, value): + self.__age = value + +p = Person() +# print p.age + +p.age = 19 +print p.age +print p.__dict__ + + + + + + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" new file mode 100644 index 0000000..55d9c34 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" @@ -0,0 +1,32 @@ + +class Person: + age = 0 + def shilifangfa(self): + print(self) + print(self.age) + print(self.num) + @classmethod + def leifangfa(cls): + print(cls) + print(cls.age) + print(cls.num) + @staticmethod + def jingtaifangfa(): + print(Person.age) + +p = Person() +p.num = 10 + +# p.shilifangfa() + +# p.leifangfa() +# Person.leifangfa() +Person.jingtaifangfa() + +# +# # 类属性 +# print(Person.age) +# print(p.age) +# +# # 实例属性 +# print(p.num) \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" new file mode 100644 index 0000000..89c1861 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" @@ -0,0 +1,52 @@ +# class Person(object): +# def __init__(self): +# self.__age = 18 +# +# # 主要作用就是, 可以以使用属性的方式, 来使用这个方法 +# @property +# def age(self): +# return self.__age +# +# +# p1 = Person() +# # print(p1.__age) +# # print(p1.getAge()) +# # +# # +# # p1.age = 1 +# # p1._Person__age = 999 +# p1.__dict__["_Person__age"] = 999 +# print(p1.age) +# # p1.age = 10 +# +# +# # p1.__age = 999 +# # print(p1.__dict__) +# +# + + +class Person: + # 当我们通过 "实例.属性 = 值", 给一个实例增加一个属性, 或者说, 修改一下属性值的时候, 都会调用这个方法 + # 在这个方法内部, 才会真正的把, 这个属性, 以及对应的数据, 给存储到__dict__字典里面 + def __setattr__(self, key, value): + print(key, value) + + # 1. 判定, key, 是否是我们要设置的只读属性的名称 + if key == "age" and key in self.__dict__.keys(): + print("这个属性是只读属性, 不能设置数据") + # 2. 如果说不是, 只读属性的名称, 真正的给它添加到这个实例里面去 + else: + # self.key = value + self.__dict__[key] = value +p1 = Person() +p1.age = 18 +# p1.name = "sz" +# print(p1.age) +print(p1.age) + + +p1.age = 999 +print(p1.age) + +print(p1.__dict__) \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" new file mode 100644 index 0000000..3ca9be9 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" @@ -0,0 +1,23 @@ +class Person: + def eat(self, food): + print("在吃饭,",self, food) + + def eat2(): + print("123") + + +p = Person() +# print(p) +# p.eat("土豆") + +# print(Person.eat) +# +# Person.eat(123, "abc") + + +# func = Person.eat +# +# func("abc", 999) + + +p.eat2() \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" new file mode 100644 index 0000000..3fdc542 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" @@ -0,0 +1,46 @@ + +# -----------------------------------------几个监听对象生命周期的方法----------------------- +# class Person: +# # def __new__(cls, *args, **kwargs): +# # print("新建了一个对象, 但是, 被我拦截了") +# def __init__(self): +# print("初始化方法") +# self.name = "sz" +# +# def __del__(self): +# print("这个对象被释放了") +# pass +# +# p = Person() +# del p +# print(p) +# print(p.name) + +# --------------------------------监听对象生命周期的方法-小案例----------------------- + +# Person, 打印一下, 当前这个时刻, 由Person类, 产生的实例, 由多少个 +# 创建了一个实例, 计数 + 1, 如果, 删除了一个实例, 计数 - 1 + +class Person: + __personCount = 0 + def __init__(self): + print("计数 + 1") + Person.__personCount += 1 + + def __del__(self): + print("计数 - 1") + self.__class__.__personCount -= 1 + + @classmethod + def log(cls): + print("当前的人的个数是%d个" % cls.__personCount) + +Person.personCount = 100 +p = Person() +p2 = Person() +Person.log() +del p +del p2 +Person.log() + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" new file mode 100644 index 0000000..04c439a --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" @@ -0,0 +1,182 @@ +# _*_ encoding:utf-8 _*_ +# 1. 定义一个类 +# class Person: +# pass +# +# # 2. 根据类, 创建一个对象 +# p1 = Person() +# p2 = Person() +# +# p1.age = 18 +# p2.address = "上海" +# +# print(p1.address) + +# 3. 给p对象, 增加一些属性 +# p.age = 18 +# p.height = 180 +# p.age = 123 +# # 4. 验证是否有添加成功 +# print(p.age) +# # print(p.__dict__) + +# print(p.sex) + +# p.pets = ["小花", "小黑"] +# print(p.pets, id(p.pets)) +# +# p.pets.append("小黄") +# +# print(p.pets, id(p.pets)) + +# num = 10 +# del num +# print(num) +# p.age = 18 +# del p.age +# print(p.age) + + +# ----------------------------类属性的操作-------------------------------------- + + +# class Money: +# pass + +# one = Money() +# one.age = 10 +# one.age = 18 + + +# Money.count = 1 +# Money.age = 18 +# Money.num = 666 + +# print(Money.count) +# print(Money.__dict__) +# +# class Test: +# sex = "男" + +# class Money: +# age = 18 +# count = 1 +# num = 666 +# +# one = Money() + +# del Money.age +# del one.age +# print(Money.age) +# print(one.age) +# print(Money.age) +# print(Money.age) +# one.age = 19 +# print(one.__dict__) +# print(Money.age) + +# one.xxx = 999 +# print(one.xxx) + +# Money.age = 22 +# print(Money.age) + +# print(Money.age) +# print(Money.count) +# print(Money.num) +# print(Money.__dict__) + + + +# one = Money() +# one.sex = "女" +# +# one.__class__ = Test +# print(one.__class__) +# +# +# # print(one.age) +# print(one.sex) +# # print(one.count) +# # print(one.num) + +# +# class Money: +# age = 18 +# name = "sz" + +# Money.__dict__ = {"sex": "男"} +# Money.__dict__["age"] = 20 +# print(Money.age) +# print(Money.__dict__) + +# one = Money() +# two = Money() +# +# print(one.age) +# print(two.age) +# +# Money.age = 20 +# +# print(one.age) +# print(two.age) + +# # +# # one.age = 19 +# # print(one.__dict__) +# +# one.__dict__ = {"name": "Sz", "age": 18} +# +# one.__dict__["age"] = 999 +# print(one.age) + +# class Person: +# age = 10 +# pass +# +# # Person.age = 19 +# # Person.age = 11 +# # del Person.age +# # Person.age +# +# +# +# +# p = Person() +# +# p.age += 5 +# # p.age = p.age + 5 +# # p.age = 15 +# +# # 这行代码会不会报错? +# +# # 如果不会报错 +# print(Person.age) +# print(p.age) +# +# # p.age = 11 +# # p.age = 18 +# # del p.age +# # p.age + + +class Person: + # @classmethod + def test(): + print("xxx") + __slots__ = ["age"] + pass + +p1 = Person() +p1.age = 1 +# p1.num = 2 + +print(p1.age) +# print(p1.num) +p2 = Person() +p2.age = 9 +# p2.b = 6 + +Person.test() +# t = Person.test +# t(123) diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" new file mode 100644 index 0000000..759f59a --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" @@ -0,0 +1,12 @@ + +class Person(object): + pass + + +print(Person.__bases__) + +# Python2.x 如果定义一个类, 没有显示的继承自object , 那么这个类就是一个经典类 +# 必须显示的继承自, object, 它才是一个新式类 + + +# Python3.x , 如果直接定义一个类, 会隐式的继承object, 默认情况下, 就已经是一个新式类 \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" new file mode 100644 index 0000000..5a27903 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" @@ -0,0 +1,661 @@ +# _*_ encoding:utf-8 _*_ +# class Person: +# __age = 18 +# +# def __run(self): +# print("pao") +# +# def _Person__run(self): +# print("xxx") +# +# +# p = Person() +# p._Person__run() +# +# print(Person.__dict__) + + +# class Person: +# def __init__(self, n, a): +# self.name = n +# self.age = a +# +# def __str__(self): +# return "这个人的姓名是%s, 这个人的年龄是:%s" % (self.name, self.age) +# +# p1 = Person("sz", 18) +# # print(p1.name) +# # print(p1.age) +# print(p1) +# +# p2 = Person("zhangsan", 19) +# # print(p2.name) +# # print(p2.age) +# print(p2) +# +# s = str(p1) +# print(s, type(s)) + +# class Person: +# def __init__(self, n, a): +# self.name = n +# self.age = a +# +# def __str__(self): +# return "这个人的姓名是%s, 这个人的年龄是:%s" % (self.name, self.age) +# +# def __repr__(self): +# return "reprxxxxx" +# +# p1 = Person("sz", 18) +# # print(p1.name) +# # print(p1.age) +# print(p1) +# +# p2 = Person("zhangsan", 19) +# # print(p2.name) +# # print(p2.age) +# print(p2) +# +# s = str(p1) +# print(s, type(s)) +# +# print(repr(p1)) + +# import datetime +# +# t = datetime.datetime.now() +# print(t) +# print(repr(t)) +# +# tmp = repr(t) +# +# result = eval(tmp) +# print(result) + + +# ----------------------------__call__方法------------------------------------ + + +# class Person: +# def __call__(self, *args, **kwargs): +# print("xxx", args, kwargs) +# pass +# +# p = Person() +# +# p(123, 456, name="sz") + + + +# 创建很多个画笔, 画笔的类型(钢笔, 铅笔), 画笔的颜色(红, 黄色, 青色, 绿色) + +# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "红色")) +# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "黄色")) +# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "青色")) +# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "绿色")) +# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "橘色")) + + +# def createPen(p_color, p_type): +# print("创建了一个%s这个类型的画笔, 它是%s颜色" % (p_type, p_color)) +# +# +# # createPen("钢笔", "红色") +# # createPen("钢笔", "绿色") +# # createPen("钢笔", "黄色") +# +# import functools +# +# gangbiFunc = functools.partial(createPen, p_type="钢笔") +# +# gangbiFunc("红色") +# gangbiFunc("黄色") +# gangbiFunc("绿色") + +# +# class PenFactory: +# +# def __init__(self, p_type): +# self.p_type = p_type +# +# def __call__(self, p_color): +# print("创建了一个%s这个类型的画笔, 它是%s颜色" % (self.p_type, p_color)) +# +# # gangbiF = PenFactory("钢笔") +# # gangbiF("红色") +# # gangbiF("绿色") +# # gangbiF("黄色") +# +# +# qianbiF = PenFactory("铅笔") +# qianbiF("红色") +# qianbiF("绿色") +# qianbiF("黄色") + +# ----------------------------索引操作------------------------------------ + + +# class Person: +# def __init__(self): +# self.cache = {} +# +# def __setitem__(self, key, value): +# # print("setitem", key, value) +# self.cache[key] = value +# +# def __getitem__(self, item): +# # print("getitem", item) +# return self.cache[item] +# +# def __delitem__(self, key): +# # print("delitem", key) +# del self.cache[key] +# +# p = Person() +# p["name"] = "sz" +# +# print(p["name"]) +# +# del p["name"] +# +# # print(p["name"]) +# print(p.cache) + + +# ----------------------------切片操作------------------------------------ + + +# l = [1, 2, 3, 4, 5] +# # print(l[3]) +# print(l[1: 4: 2]) + + +# +# class Person: +# +# def __init__(self): +# self.items = [1, 2, 3, 4, 5, 6, 7, 8] +# +# def __setitem__(self, key, value): +# # print(key, value) +# # print(key.start) +# # print(key.stop) +# # print(key.step) +# # print(value) +# # self.items[key] = value +# if isinstance(key, slice): +# self.items[key.start: key.stop: key.step] = value +# +# def __getitem__(self, item): +# print("getitem", item) +# +# def __delitem__(self, key): +# print("delitem", key) +# +# p = Person() +# p[0: 4: 2] = ["a", "b"] +# print(p.items) +# slice + +# p[0: 5: 2] +# del p[0: 5: 2] + +# ----------------------------比较操作------------------------------------ + +# class Person: +# def __init__(self, age, height): +# self.age = age +# self.height = height +# # == !=>>= < <= +# +# def __eq__(self, other): +# print("eq") +# return self.age == other.age + +# def __ne__(self, other): +# pass +# +# def __gt__(self, other): +# pass +# +# def __ge__(self, other): +# pass +# +# def __lt__(self, other): +# # print("lt") +# print(self.age) +# print(other.age) +# return self.age < other.age +# +# def __le__(self, other): +# pass + + +# p1 = Person(18, 190) +# p2 = Person(19, 190) +# print(p1 < p2) +# print(p1 <= p2) # p2 < p1 +# print(p1 == p2) +# print(p1 != p2) +# print(p1 <= p2) + + +# ----------------------------比较操作-补充------------------------------------ + +# import functools +# +# +# @functools.total_ordering +# class Person: +# def __lt__(self, other): +# print("lt") +# # pass +# return False +# +# def __eq__(self, other): +# print("eq") +# pass +# +# # def __le__(self, other): +# # print("le") +# +# p1 = Person() +# p2 = Person() +# +# print(p1 <= p2) +# +# print(Person.__dict__) + + +# ----------------------------上下文环境的布尔值------------------------------------ + +# class Person: +# def __init__(self): +# self.age = 20 +# +# def __bool__(self): +# return self.age>= 18 +# pass +# +# p = Person() +# +# +# if p: +# print("xx") + + +# ----------------------------遍历操作------------------------------------ + + +# class Person: +# def __init__(self): +# self.result = 1 +# +# def __getitem__(self, item): +# self.result += 1 +# if self.result>= 6: +# raise StopIteration("停止遍历") +# +# return self.result +# pass +# +# p = Person() +# +# for i in p: +# print(i) + + +# 方式2 +# class Person: +# def __init__(self): +# self.result = 1 +# +# def __iter__(self): +# print("iter") +# self.result = 1 +# # return iter([1, 2, 3, 4, 5]) +# return self +# +# def __next__(self): +# self.result += 1 +# if self.result>= 6: +# raise StopIteration("停止遍历") +# return self.result +# +# p = Person() +# +# # for i in p: +# # print(i) +# +# print(next(p)) +# print(next(p)) +# print(next(p)) +# print(next(p)) +# print(next(p)) +# print(next(p)) + +# result = next(p) +# while result: +# print(result) +# result = next(p) + + + +# ----------------------------恢复迭代器初始值------------------------------------ + + +# class Person: +# def __init__(self): +# self.age = 1 +# +# +# def __getitem__(self, item): +# return 1 +# def __iter__(self): +# self.age = 1 +# return self +# +# def __next__(self): +# self.age += 1 +# if self.age>= 6: +# raise StopIteration("stop") +# +# return self.age + +# next() +# p = Person() + +# for i in p: +# print(i) +# print(p.age) +# for i in p: +# print(i) + +# import collections +# print(isinstance(p, collections.Iterator)) +# print(isinstance(p, collections.Iterable)) + + +# ----------------------------iter函数的使用------------------------------------ + + +# +# class Person: +# def __init__(self): +# self.age = 1 + + # def __getitem__(self, item): + # self.age += 1 + # if self.age>= 6: + # raise StopIteration("stop") + # return self.age + + # def __iter__(self): + # self.age = 1 + # return self + + # def __next__(self): + # self.age += 1 + # if self.age>= 6: + # raise StopIteration("stop") + # return self.age + +# def __call__(self, *args, **kwargs): +# self.age += 1 +# if self.age>= 6: +# raise StopIteration("stop") +# return self.age +# p = Person() + + +# pt = iter(p) +# pt = iter(p.__next__, 4) +# pt = iter(p, 4) + +# print(pt is p) +# +# for i in pt: +# print(i) + +# l = [1, 2, 3] +# lt = iter(l) +# print(lt) + + + +# ----------------------------描述器-定义方式1------------------------------------ + + +# class Person: +# def __init__(self): +# self.__age = 10 +# +# @property +# def age(self): +# return self.__age +# +# @age.setter +# def age(self, value): +# if value < 0: +# value = 0 +# self.__age = value +# +# @age.deleter +# def age(self): +# print("del age") +# del self.__age + + # age = property(get_age, set_age, del_age) + # name = "sz" + +# p = Person() +# p.age = 19 +# del p.age +# print(p.age) +# p.age = 19 +# print(p.age) +# del p.age +# print(p.age) +# p.set_age(-10) +# print(p.get_age()) +# p.del_age() +# print(p.get_age()) +# p.age = 10 + +# help(Person) + + + + + + + +# ----------------------------描述器-定义方式2------------------------------------ + + +# class Age: +# def __get__(self, instance, owner): +# print("get") +# +# def __set__(self, instance, value): +# print("set") +# +# def __delete__(self, instance): +# print("delete") +# +# class Person: +# age = Age() + # def __init__(self): + # self.__age = 10 + # + # # @property + # def get_age(self): + # return self.__age + # + # # @age.setter + # def set_age(self, value): + # if value < 0: + # value = 0 + # self.__age = value + # + # # @age.deleter + # def del_age(self): + # print("del age") + # del self.__age + # + # age = property(get_age, set_age, del_age) + +# p = Person() +# p.age = 10 +# print(p.age) +# del p.age + + +# ----------------------------描述器-调用细节------------------------------------ + + +# class Age(object): +# def __get__(self, instance, owner): +# print("get") +# +# def __set__(self, instance, value): +# print("set") +# +# def __delete__(self, instance): +# print("delete") +# +# +# class Person(object): +# age = Age() +# def __getattribute__(self, item): +# print "xxxxx" +# +# +# p = Person() +# +# p.age = 10 +# print(p.age) +# del p.age + +# print(Person.age) +# Person.age = 19 +# del Person.age + + +# ----------------------------描述器-和实例属性同名时, 操作优先级------------------------------------ + +# 资料描述器 get set +# 非资料描述器 仅仅实现了 get 方法, 那么他就是一个非资料描述器 +# 资料描述器> 实例属性> 非资料描述器 +# class Age(object): +# def __get__(self, instance, owner): +# print("get") +# +# def __set__(self, instance, value): +# print("set") +# +# def __delete__(self, instance): +# print("delete") +# +# +# class Person(object): +# age = Age() +# def __init__(self): +# self.age = 10 +# +# p = Person() +# +# p.age = 10 +# print(p.age) +# # del p.age +# +# print(p.__dict__) + + + + +# ----------------------------描述器-值的存储问题------------------------------------ +# +# class Person: +# def __init__(self): +# self.__age = 10 +# +# def get_age(self): +# return self.__age +# +# def set_age(self, value): +# if value < 0: +# value = 0 +# self.__age = value +# +# def del_age(self): +# print("del age") +# del self.__age +# +# age = property(get_age, set_age, del_age) +# +# p = Person() +# p.age = 10 +# print(p.age) +# del p.age + + + +# class Age(object): +# def __get__(self, instance, owner): +# print("get") +# return instance.v +# +# def __set__(self, instance, value): +# print("set", self, instance, value) +# instance.v = value +# +# def __delete__(self, instance): +# print("delete") +# del instance.v +# +# +# class Person(object): +# age = Age() +# +# +# p = Person() +# p.age = 10 +# print(p.age) +# # del p.age +# +# p2 = Person() +# p2.age = 11 +# print(p2.age) +# print(p.age) + +# ----------------------------使用类, 实现装饰器------------------------------------ + + +# def check(func): +# def inner(): +# print("登录验证") +# func() +# return inner +class check: + def __init__(self, func): + self.f = func + + def __call__(self, *args, **kwargs): + print("登录验证") + self.f() + +@check +def fashuoshuo(): + print("发说说") +# fashuoshuo = check(fashuoshuo) + +fashuoshuo() + +x = "abc" +y = [x] +z = [x, y] +import objgraph +# objgraph.show_refs(y, filename='test.png') +objgraph.show_refs(z, filename="test.png") diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" new file mode 100644 index 0000000..43302e3 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" @@ -0,0 +1,44 @@ + + + + +def eat(): + print(1) + print(2) + print(3) + +# eat() + + + +class Person: + def eat2(): + print("这是一个实例方法") + + @classmethod + def leifangfa(cls): + print("这是一个类方法", cls) + + @staticmethod + def jingtaifangfa(): + print("这是一个静态方法") + + +p = Person() +# print(p) +# p.eat2() +# Person.eat2() + +# Person.leifangfa() + +# Person.jingtaifangfa() +# print(p.__dict__) +# +# print(Person.__dict__) +# def run(): +# print("run") +# +# +# p.age = run +# print(p.__dict__) +# p.eat2() \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" new file mode 100644 index 0000000..073d491 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" @@ -0,0 +1,37 @@ +# +class Animal: + __x = 10 + def test(self): + print(Animal.__x) + print(self.__x) + pass + + +# print(Animal.__x) +print(Animal.__dict__) +print(Animal._Animal__x) +# +# # +# class Dog(Animal): +# def test2(self): +# print(Dog.__x) +# print(self.__x) +# pass +# # # +# +# # 测试代码 +# a = Animal() +# a.test() +# +# d = Dog() +# d.test2() +# +# +# print(Animal.__x) +# print(Dog.__x) +# print(a.__x) +# print(d.__x) + +__all__ = ["__a"] +# +__a = 666 \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" new file mode 100644 index 0000000..bcd0df5 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" @@ -0,0 +1,37 @@ +class Person: + + # 主要作用, 当我们创建好一个实例对象之后, 会自动的调用这个方法, 来初始化这个对象 + def __init__(self): + self.__age = 18 + + def setAge(self, value): + if isinstance(value, int) and 0 < value < 200: + self.__age = value + else: + print("你输入的数据有问题, 请重新输入") + + def getAge(self): + return self.__age + +p1 = Person() +# p1.__age = -10 +# print(p1._Person__age) +p1.setAge("abc") + +# print(p1._Person__age) + +print(p1.getAge()) + +p2 = Person() + + +p3 = Person() + +# print(p1.age) +# print(p2.age) +# print(p3.age) +# print(p1.__dict__) + +# class_ + +__xx__ \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" new file mode 100644 index 0000000..5b72d1d --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" @@ -0,0 +1,22 @@ + +class Person: + # def run(self): + # print(self) + @classmethod + def leifangfa(cls, a): + print("这是一个类方法", cls, a) + + +Person.leifangfa(123) + +p = Person() +p.leifangfa(666) + + +func = Person.leifangfa +func(111) + +# 装饰器的作用: 在保证原本函数不改变的前提下, 直接给这个函数增加一些功能 +class A(Person): + pass +A.leifangfa(0) \ No newline at end of file diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" new file mode 100644 index 0000000..08e4cca --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" @@ -0,0 +1,41 @@ +# def run(): +# pass + +# 经典类 +# 新式类 +# 定义一个类 +class Money: + def eat(self): + print("eat") + + +# print(Money.__name__) +# xxx = Money +# print(xxx.__name__) +# Money = 666 +# print(Money) +# print(id(Money)) +# print(Money) +# # 根据这个类, 创建(实例化)一个对象 +one = Money() +# # print(one) +# print(one) +print(one.__class__) + + + + + + + + + + + + + + + + + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" new file mode 100644 index 0000000..71cc48b --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" @@ -0,0 +1,104 @@ + + + +# +# num = 10 +# +# print(num.__class__) +# +# +# s = "abc" +# print(s.__class__) +# +# +# class Person: +# pass +# +# p = Person() +# print(p.__class__) +# +# +# print("-"*20) +# +# +# print(int.__class__) +# # print(num.__class__.__class__) +# +# print(str.__class__) +# +# print(Person.__class__) +# print(Person.__class__.__class__) +# print(type.__class__) + + +# -----------------------------类的创建方式--------------------------- + + + + +# class Person: +# count = 0 +# def run(self): +# pass + + + +# num = 10 +# print(type(num)) + +# def run(self): +# print("---", self) +# +# xxx = type("Dog",(),{"count": 0, "run": run}) +# print(xxx) +# +# print(xxx.__dict__) + +# d = xxx() +# print(d) +# +# d.run() + + + +# -----------------------------类的创建流程------------------ + +class Test(): + pass +__metaclass__ = Test + +class Animal: + # __metaclass__ = Test + pass + + +class Person(Animal): + # __metaclass__ = Test + pass + +# +# class Dog(Animal): +# __metaclass__ = xxx +# pass + +# print(Person.__metaclass__) + + + + + + + + + + + + + + + + + + + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" new file mode 100644 index 0000000..19861ec --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" @@ -0,0 +1,31 @@ + +class Person: + """ + 这是一个人, 类 + """ + age = 19 + def __init__(self): + self.name = "sz" + + def run(self): + print("run") + + +# __dict__ : 类的属性 +# __bases__ : 类的所有父类构成元组 +# __doc__ :类的文档字符串 +# __name__: 类名 +# __module__: 类定义所在的模块 + + +print(Person.__dict__) +print(Person.__bases__) +print(Person.__doc__) +# help(Person) +print(Person.__name__) +print(Person.__module__) + +p = Person() +print(p.__class__) + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" new file mode 100644 index 0000000..e6e02a6 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" @@ -0,0 +1,483 @@ +# _*_ encoding:utf-8 _*_ + +# 计算器, 实现一些基本的操作, 加减乘除运算, 以及打印结果操作 + +# ------------------------------------代码1-------------------------------------- +# def jia(n1, n2): +# return n1 + n2 +# +# def jian(n1, n2): +# return n1 - n2 +# +# def cheng(n1, n2): +# return n1 * n2 +# +# # res = jia(2, 4) +# # res2 = cheng(5, 7) +# # print(res) +# # print(res2) +# # (2 + 6 - 4) * 5 +# +# r1 = jia(2, 6) +# r2 = jian(r1, 4) +# r3 = cheng(r2, 5) +# print(r3) + +# ------------------------------------代码2-------------------------------------- +# result = 0 +# +# def first_value(v): +# global result +# result = v +# +# def jia(n): +# global result +# result += n +# +# def jian(n): +# global result +# result -= n +# +# def cheng(n): +# global result +# result *= n +# +# +# first_value(2) +# jia(6) +# result = 123 +# jian(4) +# cheng(5) +# print(result) + +# ------------------------------------代码3-------------------------------------- + + +# class Caculator: +# __result = 0 +# +# @classmethod +# def first_value(cls, v): +# cls.__result = v +# +# @classmethod +# def jia(cls, n): +# cls.__result += n +# +# @classmethod +# def jian(cls, n): +# cls.__result -= n +# +# @classmethod +# def cheng(cls, n): +# cls.__result *= n +# +# @classmethod +# def show(cls): +# print("计算的结果是:%d" % cls.__result) +# +# Caculator.first_value(2) +# Caculator.jia(6) +# Caculator.jian(4) +# Caculator.cheng(5) +# Caculator.show() + +# ------------------------------------代码4-------------------------------------- +# +# class Caculator: +# +# def __init__(self, num): +# self.__result = num +# +# def jia(self, n): +# self.__result += n +# +# def jian(self, n): +# self.__result -= n +# +# def cheng(self, n): +# self.__result *= n +# +# def show(self): +# print("计算的结果是:%d" % self.__result) +# +# +# c1 = Caculator(2) +# c1.jia(6) +# c1.jian(4) +# c1.cheng(5) +# c1.show() + +# ------------------------------------代码5-------------------------------------- + + +# class Caculator: +# def check_num(self, num): +# if not isinstance(num, int): +# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") +# +# def __init__(self, num): +# self.check_num(num) +# self.__result = num +# +# def jia(self, n): +# self.check_num(n) +# self.__result += n +# +# def jian(self, n): +# self.check_num(n) +# self.__result -= n +# +# def cheng(self, n): +# self.check_num(n) +# self.__result *= n +# +# def show(self): +# print("计算的结果是:%d" % self.__result) +# +# +# c1 = Caculator(2) +# c1.jia(6) +# c1.jian("a") +# c1.cheng(5) +# c1.show() + +# ------------------------------------代码6-------------------------------------- +# +# class Caculator: +# def check_num_zsq(func): +# def inner(self, n): +# if not isinstance(n, int): +# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") +# return func(self, n) +# return inner +# +# @check_num_zsq +# def __init__(self, num): +# self.__result = num +# +# @check_num_zsq +# def jia(self, n): +# self.__result += n +# +# @check_num_zsq +# def jian(self, n): +# self.__result -= n +# +# @check_num_zsq +# def cheng(self, n): +# self.__result *= n +# +# def show(self): +# print("计算的结果是:%d" % self.__result) +# +# +# c1 = Caculator(2) +# c1.jia(6) +# c1.jian(4) +# c1.cheng(5) +# c1.show() + +# ------------------------------------代码7-------------------------------------- + + +# class Caculator: +# def __check_num_zsq(func): +# def inner(self, n): +# if not isinstance(n, int): +# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") +# return func(self, n) +# return inner +# +# @__check_num_zsq +# def __init__(self, num): +# self.__result = num +# +# @__check_num_zsq +# def jia(self, n): +# self.__result += n +# +# @__check_num_zsq +# def jian(self, n): +# self.__result -= n +# +# @__check_num_zsq +# def cheng(self, n): +# self.__result *= n +# +# def show(self): +# print("计算的结果是:%d" % self.__result) +# +# +# c1 = Caculator(2) +# c1.jia(6) +# c1.jian(4) +# c1.cheng(5) +# c1.show() + + +# ------------------------------------代码8-------------------------------------- +import win32com.client + +# # 1. 创建一个播报器对象 +# speaker = win32com.client.Dispatch("SAPI.SpVoice") +# +# # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 +# speaker.Speak("我的名字是sz") + +# class Caculator: +# def __check_num_zsq(func): +# def inner(self, n): +# if not isinstance(n, int): +# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") +# return func(self, n) +# +# return inner +# +# # def __say(self, word): +# # # 1. 创建一个播报器对象 +# # speaker = win32com.client.Dispatch("SAPI.SpVoice") +# # +# # # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 +# # speaker.Speak(word) +# +# def create_say_zsq(word=""): +# def __say_zsq(func): +# def inner(self, n): +# # 1. 创建一个播报器对象 +# speaker = win32com.client.Dispatch("SAPI.SpVoice") +# # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 +# speaker.Speak(word + str(n)) +# return func(self, n) +# +# return inner +# +# return __say_zsq +# +# @__check_num_zsq +# @create_say_zsq() +# def __init__(self, num): +# self.__result = num +# +# @__check_num_zsq +# @create_say_zsq("加") +# def jia(self, n): +# self.__result += n +# +# @__check_num_zsq +# @create_say_zsq("减去") +# def jian(self, n): +# self.__result -= n +# +# @__check_num_zsq +# @create_say_zsq("乘以") +# def cheng(self, n): +# self.__result *= n +# +# def show(self): +# # self.__say("计算的结果是:%d" % self.__result) +# print("计算的结果是:%d" % self.__result) +# +# c1 = Caculator(10) +# c1.jia(6) +# c1.jian(4) +# c1.cheng(5) +# c1.show() + +# ------------------------------------代码9-------------------------------------- +# import win32com.client +# +# +# class Caculator: +# def __check_num_zsq(func): +# def inner(self, n): +# if not isinstance(n, int): +# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") +# return func(self, n) +# +# return inner +# +# def __say(self, word): +# # 1. 创建一个播报器对象 +# speaker = win32com.client.Dispatch("SAPI.SpVoice") +# +# # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 +# speaker.Speak(word) +# +# def __create_say_zsq(word=""): +# def __say_zsq(func): +# def inner(self, n): +# self.__say(word + str(n)) +# return func(self, n) +# +# return inner +# return __say_zsq +# +# @__check_num_zsq +# @__create_say_zsq() +# def __init__(self, num): +# self.__result = num +# +# @__check_num_zsq +# @__create_say_zsq("加") +# def jia(self, n): +# self.__result += n +# +# @__check_num_zsq +# @__create_say_zsq("减去") +# def jian(self, n): +# self.__result -= n +# +# @__check_num_zsq +# @__create_say_zsq("乘以") +# def cheng(self, n): +# self.__result *= n +# +# def show(self): +# self.__say("计算的结果是:%d" % self.__result) +# print("计算的结果是:%d" % self.__result) +# +# c1 = Caculator(10) +# c1.jia(6) +# c1.jian(4) +# c1.cheng(5) +# c1.show() + + +# ------------------------------------代码10-------------------------------------- +# import win32com.client +# +# +# class Caculator: +# def __check_num_zsq(func): +# def inner(self, n): +# if not isinstance(n, int): +# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") +# return func(self, n) +# +# return inner +# +# def __say(self, word): +# # 1. 创建一个播报器对象 +# speaker = win32com.client.Dispatch("SAPI.SpVoice") +# +# # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 +# speaker.Speak(word) +# +# def __create_say_zsq(word=""): +# def __say_zsq(func): +# def inner(self, n): +# self.__say(word + str(n)) +# return func(self, n) +# +# return inner +# return __say_zsq +# +# @__check_num_zsq +# @__create_say_zsq() +# def __init__(self, num): +# self.__result = num +# +# @__check_num_zsq +# @__create_say_zsq("加") +# def jia(self, n): +# self.__result += n +# +# @__check_num_zsq +# @__create_say_zsq("减去") +# def jian(self, n): +# self.__result -= n +# +# @__check_num_zsq +# @__create_say_zsq("乘以") +# def cheng(self, n): +# self.__result *= n +# +# def show(self): +# self.__say("计算的结果是:%d" % self.__result) +# print("计算的结果是:%d" % self.__result) +# +# @property +# def result(self): +# return self.__result +# +# c1 = Caculator(10) +# c1.jia(6) +# c1.jian(4) +# c1.cheng(5) +# c1.show() +# +# print(c1.result) +# c1.result = 10 + +# ------------------------------------代码11-------------------------------------- +import win32com.client + + +class Caculator: + def __check_num_zsq(func): + def inner(self, n): + if not isinstance(n, int): + raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") + return func(self, n) + + return inner + + def __say(self, word): + # 1. 创建一个播报器对象 + speaker = win32com.client.Dispatch("SAPI.SpVoice") + + # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 + speaker.Speak(word) + + def __create_say_zsq(word=""): + def __say_zsq(func): + def inner(self, n): + self.__say(word + str(n)) + return func(self, n) + + return inner + return __say_zsq + + @__check_num_zsq + @__create_say_zsq() + def __init__(self, num): + self.__result = num + + @__check_num_zsq + @__create_say_zsq("加") + def jia(self, n): + self.__result += n + return self + + @__check_num_zsq + @__create_say_zsq("减去") + def jian(self, n): + self.__result -= n + return self + + @__check_num_zsq + @__create_say_zsq("乘以") + def cheng(self, n): + self.__result *= n + return self + + def show(self): + self.__say("计算的结果是:%d" % self.__result) + print("计算的结果是:%d" % self.__result) + return self + + def clear(self): + self.__result = 0 + return self + + @property + def result(self): + return self.__result + +c1 = Caculator(10) +c1.jia(6).jian(4).cheng(5).show().clear().jia(555).jian(500).show() + +print(c1.result) + + diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" new file mode 100644 index 0000000..66cb599 --- /dev/null +++ "b/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" @@ -0,0 +1,14 @@ + + +class Person: + @staticmethod + def jingtai(): + print("这是一个静态方法") + + +Person.jingtai() +p = Person() +p.jingtai() + +func = Person.jingtai +func() \ No newline at end of file From 17b5baa80d0c0dd9df2548a12138ca52e3b552b2 Mon Sep 17 00:00:00 2001 From: sz <501562071@qq.com> Date: Fri, 2 Feb 2018 21:53:24 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BB=93=E6=9E=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...05345円255円230円347円256円241円347円220円206円.py" | 213 ------ .../classDesc.html" | 67 -- .../classDesc.py" | 34 - .../other.py" | 6 - ...77347円224円250円346円226円271円345円274円217円.py" | 106 --- ...6346円200円247,円350円247円204円345円276円213円.py" | 32 - ...52350円257円273円345円261円236円346円200円247円.py" | 52 -- ...36344円276円213円346円226円271円346円263円225円.py" | 23 - ...37345円221円275円345円221円250円346円234円237円.py" | 46 -- ...36346円200円247円347円233円270円345円205円263円.py" | 182 ----- ...14347円273円217円345円205円270円347円261円273円.py" | 12 - ...0345円205円263円-350円241円245円345円205円205円.py" | 661 ------------------ ...71346円263円225円347円233円270円345円205円263円.py" | 44 -- ...11345円214円226円345円261円236円346円200円247円.py" | 37 - ...24347円224円250円345円234円272円346円231円257円.py" | 37 - .../347円261円273円346円226円271円346円263円225円.py" | 22 - ...73347円232円204円345円256円232円344円271円211円.py" | 41 -- ...73347円232円204円350円241円245円345円205円205円.py" | 104 --- ...56347円232円204円345円261円236円346円200円247円.py" | 31 - ...74345円220円210円346円241円210円344円276円213円.py" | 483 ------------- ...31346円200円201円346円226円271円346円263円225円.py" | 14 - 21 files changed, 2247 deletions(-) delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" delete mode 100644 "02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" deleted file mode 100644 index bf924d9..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" +++ /dev/null @@ -1,213 +0,0 @@ -#_*_encoding:utf-8_*_ -# class Person: -# pass -# -# p = Person() -# print(p) -# # print(id(p)) -# # print(hex(id(p))) -# -# p2 = Person() -# -# print(id(p), id(p2)) -# -# -# # 1, 2, 3 -# -# num1 = 2 -# num2 = 2 -# print(id(num1), id(num2)) -# p.name = "sz" - -# ---------------------------引用计数器-------------------------------- - -# import sys -# -# class Person: -# pass -# -# p1 = Person() # 1 -# -# print(sys.getrefcount(p1)) -# -# p2 = p1 # 2 -# -# print(sys.getrefcount(p1)) -# -# del p2 # 1 -# print(sys.getrefcount(p1)) -# -# del p1 -# print(sys.getrefcount(p1)) - - - -# ---------------------------引用计数器+1 -1 的场景举例-------------------------------- - -# import sys -# -# class Person: -# pass -# -# p_xxx = Person() # 1 -# -# print(sys.getrefcount(p_xxx)) - - -# def log(obj): -# print(sys.getrefcount(obj)) -# -# log(p_xxx) -# -# -# for attr in dir(log): -# print attr, getattr(log, attr) - - -# ---------------------------引用计数器机制-特殊场景-循环引用问题-------------------------------- - -# 内存管理机制 = 引用计数器机制 + 垃圾回收机制 -# 当一个对象, 如果被引用 + 1, 删除一个引用 : -1 0: 被自动释放 -# 循环引用 -# objgraph -# objgraph.count() 可以查看, 垃圾回收器, 跟踪的对象个数 - -# import objgraph -# -# class Person: -# pass -# -# -# class Dog: -# pass -# -# p = Person() -# d = Dog() -# -# print(objgraph.count("Person")) -# print(objgraph.count("Dog")) -# -# p.pet = d -# d.master = p -# -# # 删除 p, d之后, 对应的对象是否被释放掉 -# del p -# del d -# -# print(objgraph.count("Person")) -# print(objgraph.count("Dog")) - - - - -# ---------------------------------垃圾回收机制-如何检测"循环引用"--------------------------------------- - -# -# class Person: -# pass -# -# p = Person() -# l = [p] -# t = (p) -# # p.pet = Dog() -# -# -# -# num = True -# num.age = 10 - - -# ---------------------------------垃圾回收机制-分代回收--------------------------------------- - - -# import gc -# -# print(gc.get_threshold()) -# gc.set_threshold(200, 5, 5) -# -# print(gc.get_threshold()) - - -# ---------------------------------垃圾回收机制-触发时机--------------------------------------- - - -# 自动回收 -# -# import gc -# -# gc.disable() -# print(gc.isenabled()) -# -# gc.enable() -# -# print(gc.isenabled()) -# -# print(gc.get_threshold()) -# gc.set_threshold(1000, 15, 5) - - -# 手动回收 -# import objgraph -# import gc -# gc.disable() -# class Person: -# pass -# -# class Dog: -# pass -# -# p = Person() -# d = Dog() -# -# p.pet = d -# d.master = p -# -# -# del p -# del d -# -# gc.collect() -# -# print(objgraph.count("Person")) -# print(objgraph.count("Dog")) - - -# -----------------------------------循环引用-细节问题(版本兼容方案)--------------------------------------- -import objgraph -import gc -import weakref -# import weakref - -# 1. 定义了两个类 -class Person: - def __del__(self): - print("Person对象, 被释放了") - pass - -class Dog: - def __del__(self): - print("Dog对象, 被释放了") - pass - -# 2. 根据这两个类, 创建出两个实例对象 -p = Person() -d = Dog() - -# 3. 让两个实例对象之间互相引用, 造成循环引用 -# p.pets = {"dog": weakref.ref(d1), "cat": weakref.ref(c1)} -# weakref.WeakValueDictionary({"dog": d1, "cat": c1}) -# p.pet = d -# d.master = weakref.ref(p) -# d.master = p - -# 4. 尝试删除可到达引用之后, 测试真实对象是否有被回收 -# p.pet = None -del p -del d - -# 5. 通过"引用计数机制"无法回收; 需要借助"垃圾回收机制"进行回收 -# gc.collect() - -print(objgraph.count("Person")) -print(objgraph.count("Dog")) - diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" deleted file mode 100644 index 9948f25..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" +++ /dev/null @@ -1,67 +0,0 @@ - -Python: module classDesc - - - - - -

-
classDesc
index
c:\users\think\desktop\python核心_code\classdesc.py
- -

- - - - - -

-Classes
-
builtins.object -
-
-
Person -
-
-
-

- - - - - - - -

-class Person(builtins.object)
关于这个类的描述, 类的作用, 类的构造函数等等; 类属性的描述
-Attributes:
- count: int 代表是人的个数
Methods defined here:
-
run(self, distance, step)
这个方法的作用效果
-:param distance: 参数的含义, 参数的类型int, 是否有默认值
-:param step:
-:return: 返回的结果的含义(时间), 返回数据的类型int
- -
-Data descriptors defined here:
-
__dict__
-
dictionary for instance variables (if defined)
-
-
__weakref__
-
list of weak references to the object (if defined)
-
-
-Data and other attributes defined here:
-
count = 1
- -

- - - - - -

-Functions
xxx()
这是一个xxx函数, 有xxx作用
-:return:
-
- \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" deleted file mode 100644 index 0e45031..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" +++ /dev/null @@ -1,34 +0,0 @@ - -class Person: - """ - 关于这个类的描述, 类的作用, 类的构造函数等等; 类属性的描述 - Attributes: - count: int 代表是人的个数 - """ - # 这个表示, 是人的个数 - count = 1 - - def run(self, distance, step): - """ - 这个方法的作用效果 - :param distance: 参数的含义, 参数的类型int, 是否有默认值 - :param step: - :return: 返回的结果的含义(时间), 返回数据的类型int - """ - print("人在跑") - return distance / step - def __init__(self): - self.__name = "sz" - -# help(Person) - -def xxx(): - """ - 这是一个xxx函数, 有xxx作用 - :return: - """ - print("xxx") - - - - diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" deleted file mode 100644 index 6a4c69c..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" +++ /dev/null @@ -1,6 +0,0 @@ -# import 私有化属性 -# -# print(私有化属性.__a) - -from 私有化属性 import * -print(__a) \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" deleted file mode 100644 index e2aeaa7..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" +++ /dev/null @@ -1,106 +0,0 @@ -# _*_ encoding:utf-8 _*_ -# class Person(object): -# def __init__(self): -# self.__age = 18 -# -# -# def get_age(self): -# print("----, get") -# return self.__age -# -# def set_age(self, value): -# print("----, set") -# self.__age = value -# -# -# age = property(get_age, set_age) -# -# -# p = Person() -# print(p.age) -# -# p.age = 90 -# print(p.age) -# -# print(p.__dict__) - - -# 第二种使用方式 - -# class Person(object): -# def __init__(self): -# self.__age = 18 -# -# @property -# def age(self): -# print("----- get") -# return self.__age -# -# @age.setter -# def age(self, value): -# print("----- set") -# self.__age = value -# -# p = Person() -# print(p.age) -# -# p.age = 10 -# print(p.age) - -# -------------------------------property在经典类中的使用--------------------------------------- - -# -# class Person: -# def __init__(self): -# self.__age = 18 -# -# -# def get_age(self): -# print("----, get") -# return self.__age -# -# def set_age(self, value): -# print("----, set") -# self.__age = value -# -# -# age = property(get_age, set_age) -# -# -# p = Person() -# print p.age -# -# p.age = 19 -# print p.age -# -# print p.__dict__ - - - - -class Person: - def __init__(self): - self.__age = 18 - - @property - def age(self): - print "-----get" - return self.__age - - @age.setter - def age(self, value): - self.__age = value - -p = Person() -# print p.age - -p.age = 19 -print p.age -print p.__dict__ - - - - - - - diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" deleted file mode 100644 index 55d9c34..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" +++ /dev/null @@ -1,32 +0,0 @@ - -class Person: - age = 0 - def shilifangfa(self): - print(self) - print(self.age) - print(self.num) - @classmethod - def leifangfa(cls): - print(cls) - print(cls.age) - print(cls.num) - @staticmethod - def jingtaifangfa(): - print(Person.age) - -p = Person() -p.num = 10 - -# p.shilifangfa() - -# p.leifangfa() -# Person.leifangfa() -Person.jingtaifangfa() - -# -# # 类属性 -# print(Person.age) -# print(p.age) -# -# # 实例属性 -# print(p.num) \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" deleted file mode 100644 index 89c1861..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" +++ /dev/null @@ -1,52 +0,0 @@ -# class Person(object): -# def __init__(self): -# self.__age = 18 -# -# # 主要作用就是, 可以以使用属性的方式, 来使用这个方法 -# @property -# def age(self): -# return self.__age -# -# -# p1 = Person() -# # print(p1.__age) -# # print(p1.getAge()) -# # -# # -# # p1.age = 1 -# # p1._Person__age = 999 -# p1.__dict__["_Person__age"] = 999 -# print(p1.age) -# # p1.age = 10 -# -# -# # p1.__age = 999 -# # print(p1.__dict__) -# -# - - -class Person: - # 当我们通过 "实例.属性 = 值", 给一个实例增加一个属性, 或者说, 修改一下属性值的时候, 都会调用这个方法 - # 在这个方法内部, 才会真正的把, 这个属性, 以及对应的数据, 给存储到__dict__字典里面 - def __setattr__(self, key, value): - print(key, value) - - # 1. 判定, key, 是否是我们要设置的只读属性的名称 - if key == "age" and key in self.__dict__.keys(): - print("这个属性是只读属性, 不能设置数据") - # 2. 如果说不是, 只读属性的名称, 真正的给它添加到这个实例里面去 - else: - # self.key = value - self.__dict__[key] = value -p1 = Person() -p1.age = 18 -# p1.name = "sz" -# print(p1.age) -print(p1.age) - - -p1.age = 999 -print(p1.age) - -print(p1.__dict__) \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" deleted file mode 100644 index 3ca9be9..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" +++ /dev/null @@ -1,23 +0,0 @@ -class Person: - def eat(self, food): - print("在吃饭,",self, food) - - def eat2(): - print("123") - - -p = Person() -# print(p) -# p.eat("土豆") - -# print(Person.eat) -# -# Person.eat(123, "abc") - - -# func = Person.eat -# -# func("abc", 999) - - -p.eat2() \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" deleted file mode 100644 index 3fdc542..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" +++ /dev/null @@ -1,46 +0,0 @@ - -# -----------------------------------------几个监听对象生命周期的方法----------------------- -# class Person: -# # def __new__(cls, *args, **kwargs): -# # print("新建了一个对象, 但是, 被我拦截了") -# def __init__(self): -# print("初始化方法") -# self.name = "sz" -# -# def __del__(self): -# print("这个对象被释放了") -# pass -# -# p = Person() -# del p -# print(p) -# print(p.name) - -# --------------------------------监听对象生命周期的方法-小案例----------------------- - -# Person, 打印一下, 当前这个时刻, 由Person类, 产生的实例, 由多少个 -# 创建了一个实例, 计数 + 1, 如果, 删除了一个实例, 计数 - 1 - -class Person: - __personCount = 0 - def __init__(self): - print("计数 + 1") - Person.__personCount += 1 - - def __del__(self): - print("计数 - 1") - self.__class__.__personCount -= 1 - - @classmethod - def log(cls): - print("当前的人的个数是%d个" % cls.__personCount) - -Person.personCount = 100 -p = Person() -p2 = Person() -Person.log() -del p -del p2 -Person.log() - - diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" deleted file mode 100644 index 04c439a..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" +++ /dev/null @@ -1,182 +0,0 @@ -# _*_ encoding:utf-8 _*_ -# 1. 定义一个类 -# class Person: -# pass -# -# # 2. 根据类, 创建一个对象 -# p1 = Person() -# p2 = Person() -# -# p1.age = 18 -# p2.address = "上海" -# -# print(p1.address) - -# 3. 给p对象, 增加一些属性 -# p.age = 18 -# p.height = 180 -# p.age = 123 -# # 4. 验证是否有添加成功 -# print(p.age) -# # print(p.__dict__) - -# print(p.sex) - -# p.pets = ["小花", "小黑"] -# print(p.pets, id(p.pets)) -# -# p.pets.append("小黄") -# -# print(p.pets, id(p.pets)) - -# num = 10 -# del num -# print(num) -# p.age = 18 -# del p.age -# print(p.age) - - -# ----------------------------类属性的操作-------------------------------------- - - -# class Money: -# pass - -# one = Money() -# one.age = 10 -# one.age = 18 - - -# Money.count = 1 -# Money.age = 18 -# Money.num = 666 - -# print(Money.count) -# print(Money.__dict__) -# -# class Test: -# sex = "男" - -# class Money: -# age = 18 -# count = 1 -# num = 666 -# -# one = Money() - -# del Money.age -# del one.age -# print(Money.age) -# print(one.age) -# print(Money.age) -# print(Money.age) -# one.age = 19 -# print(one.__dict__) -# print(Money.age) - -# one.xxx = 999 -# print(one.xxx) - -# Money.age = 22 -# print(Money.age) - -# print(Money.age) -# print(Money.count) -# print(Money.num) -# print(Money.__dict__) - - - -# one = Money() -# one.sex = "女" -# -# one.__class__ = Test -# print(one.__class__) -# -# -# # print(one.age) -# print(one.sex) -# # print(one.count) -# # print(one.num) - -# -# class Money: -# age = 18 -# name = "sz" - -# Money.__dict__ = {"sex": "男"} -# Money.__dict__["age"] = 20 -# print(Money.age) -# print(Money.__dict__) - -# one = Money() -# two = Money() -# -# print(one.age) -# print(two.age) -# -# Money.age = 20 -# -# print(one.age) -# print(two.age) - -# # -# # one.age = 19 -# # print(one.__dict__) -# -# one.__dict__ = {"name": "Sz", "age": 18} -# -# one.__dict__["age"] = 999 -# print(one.age) - -# class Person: -# age = 10 -# pass -# -# # Person.age = 19 -# # Person.age = 11 -# # del Person.age -# # Person.age -# -# -# -# -# p = Person() -# -# p.age += 5 -# # p.age = p.age + 5 -# # p.age = 15 -# -# # 这行代码会不会报错? -# -# # 如果不会报错 -# print(Person.age) -# print(p.age) -# -# # p.age = 11 -# # p.age = 18 -# # del p.age -# # p.age - - -class Person: - # @classmethod - def test(): - print("xxx") - __slots__ = ["age"] - pass - -p1 = Person() -p1.age = 1 -# p1.num = 2 - -print(p1.age) -# print(p1.num) -p2 = Person() -p2.age = 9 -# p2.b = 6 - -Person.test() -# t = Person.test -# t(123) diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" deleted file mode 100644 index 759f59a..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" +++ /dev/null @@ -1,12 +0,0 @@ - -class Person(object): - pass - - -print(Person.__bases__) - -# Python2.x 如果定义一个类, 没有显示的继承自object , 那么这个类就是一个经典类 -# 必须显示的继承自, object, 它才是一个新式类 - - -# Python3.x , 如果直接定义一个类, 会隐式的继承object, 默认情况下, 就已经是一个新式类 \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" deleted file mode 100644 index 5a27903..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" +++ /dev/null @@ -1,661 +0,0 @@ -# _*_ encoding:utf-8 _*_ -# class Person: -# __age = 18 -# -# def __run(self): -# print("pao") -# -# def _Person__run(self): -# print("xxx") -# -# -# p = Person() -# p._Person__run() -# -# print(Person.__dict__) - - -# class Person: -# def __init__(self, n, a): -# self.name = n -# self.age = a -# -# def __str__(self): -# return "这个人的姓名是%s, 这个人的年龄是:%s" % (self.name, self.age) -# -# p1 = Person("sz", 18) -# # print(p1.name) -# # print(p1.age) -# print(p1) -# -# p2 = Person("zhangsan", 19) -# # print(p2.name) -# # print(p2.age) -# print(p2) -# -# s = str(p1) -# print(s, type(s)) - -# class Person: -# def __init__(self, n, a): -# self.name = n -# self.age = a -# -# def __str__(self): -# return "这个人的姓名是%s, 这个人的年龄是:%s" % (self.name, self.age) -# -# def __repr__(self): -# return "reprxxxxx" -# -# p1 = Person("sz", 18) -# # print(p1.name) -# # print(p1.age) -# print(p1) -# -# p2 = Person("zhangsan", 19) -# # print(p2.name) -# # print(p2.age) -# print(p2) -# -# s = str(p1) -# print(s, type(s)) -# -# print(repr(p1)) - -# import datetime -# -# t = datetime.datetime.now() -# print(t) -# print(repr(t)) -# -# tmp = repr(t) -# -# result = eval(tmp) -# print(result) - - -# ----------------------------__call__方法------------------------------------ - - -# class Person: -# def __call__(self, *args, **kwargs): -# print("xxx", args, kwargs) -# pass -# -# p = Person() -# -# p(123, 456, name="sz") - - - -# 创建很多个画笔, 画笔的类型(钢笔, 铅笔), 画笔的颜色(红, 黄色, 青色, 绿色) - -# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "红色")) -# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "黄色")) -# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "青色")) -# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "绿色")) -# print("创建了一个%s这个类型的画笔, 它是%s颜色" % ("钢笔", "橘色")) - - -# def createPen(p_color, p_type): -# print("创建了一个%s这个类型的画笔, 它是%s颜色" % (p_type, p_color)) -# -# -# # createPen("钢笔", "红色") -# # createPen("钢笔", "绿色") -# # createPen("钢笔", "黄色") -# -# import functools -# -# gangbiFunc = functools.partial(createPen, p_type="钢笔") -# -# gangbiFunc("红色") -# gangbiFunc("黄色") -# gangbiFunc("绿色") - -# -# class PenFactory: -# -# def __init__(self, p_type): -# self.p_type = p_type -# -# def __call__(self, p_color): -# print("创建了一个%s这个类型的画笔, 它是%s颜色" % (self.p_type, p_color)) -# -# # gangbiF = PenFactory("钢笔") -# # gangbiF("红色") -# # gangbiF("绿色") -# # gangbiF("黄色") -# -# -# qianbiF = PenFactory("铅笔") -# qianbiF("红色") -# qianbiF("绿色") -# qianbiF("黄色") - -# ----------------------------索引操作------------------------------------ - - -# class Person: -# def __init__(self): -# self.cache = {} -# -# def __setitem__(self, key, value): -# # print("setitem", key, value) -# self.cache[key] = value -# -# def __getitem__(self, item): -# # print("getitem", item) -# return self.cache[item] -# -# def __delitem__(self, key): -# # print("delitem", key) -# del self.cache[key] -# -# p = Person() -# p["name"] = "sz" -# -# print(p["name"]) -# -# del p["name"] -# -# # print(p["name"]) -# print(p.cache) - - -# ----------------------------切片操作------------------------------------ - - -# l = [1, 2, 3, 4, 5] -# # print(l[3]) -# print(l[1: 4: 2]) - - -# -# class Person: -# -# def __init__(self): -# self.items = [1, 2, 3, 4, 5, 6, 7, 8] -# -# def __setitem__(self, key, value): -# # print(key, value) -# # print(key.start) -# # print(key.stop) -# # print(key.step) -# # print(value) -# # self.items[key] = value -# if isinstance(key, slice): -# self.items[key.start: key.stop: key.step] = value -# -# def __getitem__(self, item): -# print("getitem", item) -# -# def __delitem__(self, key): -# print("delitem", key) -# -# p = Person() -# p[0: 4: 2] = ["a", "b"] -# print(p.items) -# slice - -# p[0: 5: 2] -# del p[0: 5: 2] - -# ----------------------------比较操作------------------------------------ - -# class Person: -# def __init__(self, age, height): -# self.age = age -# self.height = height -# # == !=>>= < <= -# -# def __eq__(self, other): -# print("eq") -# return self.age == other.age - -# def __ne__(self, other): -# pass -# -# def __gt__(self, other): -# pass -# -# def __ge__(self, other): -# pass -# -# def __lt__(self, other): -# # print("lt") -# print(self.age) -# print(other.age) -# return self.age < other.age -# -# def __le__(self, other): -# pass - - -# p1 = Person(18, 190) -# p2 = Person(19, 190) -# print(p1 < p2) -# print(p1 <= p2) # p2 < p1 -# print(p1 == p2) -# print(p1 != p2) -# print(p1 <= p2) - - -# ----------------------------比较操作-补充------------------------------------ - -# import functools -# -# -# @functools.total_ordering -# class Person: -# def __lt__(self, other): -# print("lt") -# # pass -# return False -# -# def __eq__(self, other): -# print("eq") -# pass -# -# # def __le__(self, other): -# # print("le") -# -# p1 = Person() -# p2 = Person() -# -# print(p1 <= p2) -# -# print(Person.__dict__) - - -# ----------------------------上下文环境的布尔值------------------------------------ - -# class Person: -# def __init__(self): -# self.age = 20 -# -# def __bool__(self): -# return self.age>= 18 -# pass -# -# p = Person() -# -# -# if p: -# print("xx") - - -# ----------------------------遍历操作------------------------------------ - - -# class Person: -# def __init__(self): -# self.result = 1 -# -# def __getitem__(self, item): -# self.result += 1 -# if self.result>= 6: -# raise StopIteration("停止遍历") -# -# return self.result -# pass -# -# p = Person() -# -# for i in p: -# print(i) - - -# 方式2 -# class Person: -# def __init__(self): -# self.result = 1 -# -# def __iter__(self): -# print("iter") -# self.result = 1 -# # return iter([1, 2, 3, 4, 5]) -# return self -# -# def __next__(self): -# self.result += 1 -# if self.result>= 6: -# raise StopIteration("停止遍历") -# return self.result -# -# p = Person() -# -# # for i in p: -# # print(i) -# -# print(next(p)) -# print(next(p)) -# print(next(p)) -# print(next(p)) -# print(next(p)) -# print(next(p)) - -# result = next(p) -# while result: -# print(result) -# result = next(p) - - - -# ----------------------------恢复迭代器初始值------------------------------------ - - -# class Person: -# def __init__(self): -# self.age = 1 -# -# -# def __getitem__(self, item): -# return 1 -# def __iter__(self): -# self.age = 1 -# return self -# -# def __next__(self): -# self.age += 1 -# if self.age>= 6: -# raise StopIteration("stop") -# -# return self.age - -# next() -# p = Person() - -# for i in p: -# print(i) -# print(p.age) -# for i in p: -# print(i) - -# import collections -# print(isinstance(p, collections.Iterator)) -# print(isinstance(p, collections.Iterable)) - - -# ----------------------------iter函数的使用------------------------------------ - - -# -# class Person: -# def __init__(self): -# self.age = 1 - - # def __getitem__(self, item): - # self.age += 1 - # if self.age>= 6: - # raise StopIteration("stop") - # return self.age - - # def __iter__(self): - # self.age = 1 - # return self - - # def __next__(self): - # self.age += 1 - # if self.age>= 6: - # raise StopIteration("stop") - # return self.age - -# def __call__(self, *args, **kwargs): -# self.age += 1 -# if self.age>= 6: -# raise StopIteration("stop") -# return self.age -# p = Person() - - -# pt = iter(p) -# pt = iter(p.__next__, 4) -# pt = iter(p, 4) - -# print(pt is p) -# -# for i in pt: -# print(i) - -# l = [1, 2, 3] -# lt = iter(l) -# print(lt) - - - -# ----------------------------描述器-定义方式1------------------------------------ - - -# class Person: -# def __init__(self): -# self.__age = 10 -# -# @property -# def age(self): -# return self.__age -# -# @age.setter -# def age(self, value): -# if value < 0: -# value = 0 -# self.__age = value -# -# @age.deleter -# def age(self): -# print("del age") -# del self.__age - - # age = property(get_age, set_age, del_age) - # name = "sz" - -# p = Person() -# p.age = 19 -# del p.age -# print(p.age) -# p.age = 19 -# print(p.age) -# del p.age -# print(p.age) -# p.set_age(-10) -# print(p.get_age()) -# p.del_age() -# print(p.get_age()) -# p.age = 10 - -# help(Person) - - - - - - - -# ----------------------------描述器-定义方式2------------------------------------ - - -# class Age: -# def __get__(self, instance, owner): -# print("get") -# -# def __set__(self, instance, value): -# print("set") -# -# def __delete__(self, instance): -# print("delete") -# -# class Person: -# age = Age() - # def __init__(self): - # self.__age = 10 - # - # # @property - # def get_age(self): - # return self.__age - # - # # @age.setter - # def set_age(self, value): - # if value < 0: - # value = 0 - # self.__age = value - # - # # @age.deleter - # def del_age(self): - # print("del age") - # del self.__age - # - # age = property(get_age, set_age, del_age) - -# p = Person() -# p.age = 10 -# print(p.age) -# del p.age - - -# ----------------------------描述器-调用细节------------------------------------ - - -# class Age(object): -# def __get__(self, instance, owner): -# print("get") -# -# def __set__(self, instance, value): -# print("set") -# -# def __delete__(self, instance): -# print("delete") -# -# -# class Person(object): -# age = Age() -# def __getattribute__(self, item): -# print "xxxxx" -# -# -# p = Person() -# -# p.age = 10 -# print(p.age) -# del p.age - -# print(Person.age) -# Person.age = 19 -# del Person.age - - -# ----------------------------描述器-和实例属性同名时, 操作优先级------------------------------------ - -# 资料描述器 get set -# 非资料描述器 仅仅实现了 get 方法, 那么他就是一个非资料描述器 -# 资料描述器> 实例属性> 非资料描述器 -# class Age(object): -# def __get__(self, instance, owner): -# print("get") -# -# def __set__(self, instance, value): -# print("set") -# -# def __delete__(self, instance): -# print("delete") -# -# -# class Person(object): -# age = Age() -# def __init__(self): -# self.age = 10 -# -# p = Person() -# -# p.age = 10 -# print(p.age) -# # del p.age -# -# print(p.__dict__) - - - - -# ----------------------------描述器-值的存储问题------------------------------------ -# -# class Person: -# def __init__(self): -# self.__age = 10 -# -# def get_age(self): -# return self.__age -# -# def set_age(self, value): -# if value < 0: -# value = 0 -# self.__age = value -# -# def del_age(self): -# print("del age") -# del self.__age -# -# age = property(get_age, set_age, del_age) -# -# p = Person() -# p.age = 10 -# print(p.age) -# del p.age - - - -# class Age(object): -# def __get__(self, instance, owner): -# print("get") -# return instance.v -# -# def __set__(self, instance, value): -# print("set", self, instance, value) -# instance.v = value -# -# def __delete__(self, instance): -# print("delete") -# del instance.v -# -# -# class Person(object): -# age = Age() -# -# -# p = Person() -# p.age = 10 -# print(p.age) -# # del p.age -# -# p2 = Person() -# p2.age = 11 -# print(p2.age) -# print(p.age) - -# ----------------------------使用类, 实现装饰器------------------------------------ - - -# def check(func): -# def inner(): -# print("登录验证") -# func() -# return inner -class check: - def __init__(self, func): - self.f = func - - def __call__(self, *args, **kwargs): - print("登录验证") - self.f() - -@check -def fashuoshuo(): - print("发说说") -# fashuoshuo = check(fashuoshuo) - -fashuoshuo() - -x = "abc" -y = [x] -z = [x, y] -import objgraph -# objgraph.show_refs(y, filename='test.png') -objgraph.show_refs(z, filename="test.png") diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" deleted file mode 100644 index 43302e3..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" +++ /dev/null @@ -1,44 +0,0 @@ - - - - -def eat(): - print(1) - print(2) - print(3) - -# eat() - - - -class Person: - def eat2(): - print("这是一个实例方法") - - @classmethod - def leifangfa(cls): - print("这是一个类方法", cls) - - @staticmethod - def jingtaifangfa(): - print("这是一个静态方法") - - -p = Person() -# print(p) -# p.eat2() -# Person.eat2() - -# Person.leifangfa() - -# Person.jingtaifangfa() -# print(p.__dict__) -# -# print(Person.__dict__) -# def run(): -# print("run") -# -# -# p.age = run -# print(p.__dict__) -# p.eat2() \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" deleted file mode 100644 index 073d491..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" +++ /dev/null @@ -1,37 +0,0 @@ -# -class Animal: - __x = 10 - def test(self): - print(Animal.__x) - print(self.__x) - pass - - -# print(Animal.__x) -print(Animal.__dict__) -print(Animal._Animal__x) -# -# # -# class Dog(Animal): -# def test2(self): -# print(Dog.__x) -# print(self.__x) -# pass -# # # -# -# # 测试代码 -# a = Animal() -# a.test() -# -# d = Dog() -# d.test2() -# -# -# print(Animal.__x) -# print(Dog.__x) -# print(a.__x) -# print(d.__x) - -__all__ = ["__a"] -# -__a = 666 \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" deleted file mode 100644 index bcd0df5..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" +++ /dev/null @@ -1,37 +0,0 @@ -class Person: - - # 主要作用, 当我们创建好一个实例对象之后, 会自动的调用这个方法, 来初始化这个对象 - def __init__(self): - self.__age = 18 - - def setAge(self, value): - if isinstance(value, int) and 0 < value < 200: - self.__age = value - else: - print("你输入的数据有问题, 请重新输入") - - def getAge(self): - return self.__age - -p1 = Person() -# p1.__age = -10 -# print(p1._Person__age) -p1.setAge("abc") - -# print(p1._Person__age) - -print(p1.getAge()) - -p2 = Person() - - -p3 = Person() - -# print(p1.age) -# print(p2.age) -# print(p3.age) -# print(p1.__dict__) - -# class_ - -__xx__ \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" deleted file mode 100644 index 5b72d1d..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" +++ /dev/null @@ -1,22 +0,0 @@ - -class Person: - # def run(self): - # print(self) - @classmethod - def leifangfa(cls, a): - print("这是一个类方法", cls, a) - - -Person.leifangfa(123) - -p = Person() -p.leifangfa(666) - - -func = Person.leifangfa -func(111) - -# 装饰器的作用: 在保证原本函数不改变的前提下, 直接给这个函数增加一些功能 -class A(Person): - pass -A.leifangfa(0) \ No newline at end of file diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" deleted file mode 100644 index 08e4cca..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" +++ /dev/null @@ -1,41 +0,0 @@ -# def run(): -# pass - -# 经典类 -# 新式类 -# 定义一个类 -class Money: - def eat(self): - print("eat") - - -# print(Money.__name__) -# xxx = Money -# print(xxx.__name__) -# Money = 666 -# print(Money) -# print(id(Money)) -# print(Money) -# # 根据这个类, 创建(实例化)一个对象 -one = Money() -# # print(one) -# print(one) -print(one.__class__) - - - - - - - - - - - - - - - - - - diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" deleted file mode 100644 index 71cc48b..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" +++ /dev/null @@ -1,104 +0,0 @@ - - - -# -# num = 10 -# -# print(num.__class__) -# -# -# s = "abc" -# print(s.__class__) -# -# -# class Person: -# pass -# -# p = Person() -# print(p.__class__) -# -# -# print("-"*20) -# -# -# print(int.__class__) -# # print(num.__class__.__class__) -# -# print(str.__class__) -# -# print(Person.__class__) -# print(Person.__class__.__class__) -# print(type.__class__) - - -# -----------------------------类的创建方式--------------------------- - - - - -# class Person: -# count = 0 -# def run(self): -# pass - - - -# num = 10 -# print(type(num)) - -# def run(self): -# print("---", self) -# -# xxx = type("Dog",(),{"count": 0, "run": run}) -# print(xxx) -# -# print(xxx.__dict__) - -# d = xxx() -# print(d) -# -# d.run() - - - -# -----------------------------类的创建流程------------------ - -class Test(): - pass -__metaclass__ = Test - -class Animal: - # __metaclass__ = Test - pass - - -class Person(Animal): - # __metaclass__ = Test - pass - -# -# class Dog(Animal): -# __metaclass__ = xxx -# pass - -# print(Person.__metaclass__) - - - - - - - - - - - - - - - - - - - - diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" deleted file mode 100644 index 19861ec..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" +++ /dev/null @@ -1,31 +0,0 @@ - -class Person: - """ - 这是一个人, 类 - """ - age = 19 - def __init__(self): - self.name = "sz" - - def run(self): - print("run") - - -# __dict__ : 类的属性 -# __bases__ : 类的所有父类构成元组 -# __doc__ :类的文档字符串 -# __name__: 类名 -# __module__: 类定义所在的模块 - - -print(Person.__dict__) -print(Person.__bases__) -print(Person.__doc__) -# help(Person) -print(Person.__name__) -print(Person.__module__) - -p = Person() -print(p.__class__) - - diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" deleted file mode 100644 index e6e02a6..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" +++ /dev/null @@ -1,483 +0,0 @@ -# _*_ encoding:utf-8 _*_ - -# 计算器, 实现一些基本的操作, 加减乘除运算, 以及打印结果操作 - -# ------------------------------------代码1-------------------------------------- -# def jia(n1, n2): -# return n1 + n2 -# -# def jian(n1, n2): -# return n1 - n2 -# -# def cheng(n1, n2): -# return n1 * n2 -# -# # res = jia(2, 4) -# # res2 = cheng(5, 7) -# # print(res) -# # print(res2) -# # (2 + 6 - 4) * 5 -# -# r1 = jia(2, 6) -# r2 = jian(r1, 4) -# r3 = cheng(r2, 5) -# print(r3) - -# ------------------------------------代码2-------------------------------------- -# result = 0 -# -# def first_value(v): -# global result -# result = v -# -# def jia(n): -# global result -# result += n -# -# def jian(n): -# global result -# result -= n -# -# def cheng(n): -# global result -# result *= n -# -# -# first_value(2) -# jia(6) -# result = 123 -# jian(4) -# cheng(5) -# print(result) - -# ------------------------------------代码3-------------------------------------- - - -# class Caculator: -# __result = 0 -# -# @classmethod -# def first_value(cls, v): -# cls.__result = v -# -# @classmethod -# def jia(cls, n): -# cls.__result += n -# -# @classmethod -# def jian(cls, n): -# cls.__result -= n -# -# @classmethod -# def cheng(cls, n): -# cls.__result *= n -# -# @classmethod -# def show(cls): -# print("计算的结果是:%d" % cls.__result) -# -# Caculator.first_value(2) -# Caculator.jia(6) -# Caculator.jian(4) -# Caculator.cheng(5) -# Caculator.show() - -# ------------------------------------代码4-------------------------------------- -# -# class Caculator: -# -# def __init__(self, num): -# self.__result = num -# -# def jia(self, n): -# self.__result += n -# -# def jian(self, n): -# self.__result -= n -# -# def cheng(self, n): -# self.__result *= n -# -# def show(self): -# print("计算的结果是:%d" % self.__result) -# -# -# c1 = Caculator(2) -# c1.jia(6) -# c1.jian(4) -# c1.cheng(5) -# c1.show() - -# ------------------------------------代码5-------------------------------------- - - -# class Caculator: -# def check_num(self, num): -# if not isinstance(num, int): -# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") -# -# def __init__(self, num): -# self.check_num(num) -# self.__result = num -# -# def jia(self, n): -# self.check_num(n) -# self.__result += n -# -# def jian(self, n): -# self.check_num(n) -# self.__result -= n -# -# def cheng(self, n): -# self.check_num(n) -# self.__result *= n -# -# def show(self): -# print("计算的结果是:%d" % self.__result) -# -# -# c1 = Caculator(2) -# c1.jia(6) -# c1.jian("a") -# c1.cheng(5) -# c1.show() - -# ------------------------------------代码6-------------------------------------- -# -# class Caculator: -# def check_num_zsq(func): -# def inner(self, n): -# if not isinstance(n, int): -# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") -# return func(self, n) -# return inner -# -# @check_num_zsq -# def __init__(self, num): -# self.__result = num -# -# @check_num_zsq -# def jia(self, n): -# self.__result += n -# -# @check_num_zsq -# def jian(self, n): -# self.__result -= n -# -# @check_num_zsq -# def cheng(self, n): -# self.__result *= n -# -# def show(self): -# print("计算的结果是:%d" % self.__result) -# -# -# c1 = Caculator(2) -# c1.jia(6) -# c1.jian(4) -# c1.cheng(5) -# c1.show() - -# ------------------------------------代码7-------------------------------------- - - -# class Caculator: -# def __check_num_zsq(func): -# def inner(self, n): -# if not isinstance(n, int): -# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") -# return func(self, n) -# return inner -# -# @__check_num_zsq -# def __init__(self, num): -# self.__result = num -# -# @__check_num_zsq -# def jia(self, n): -# self.__result += n -# -# @__check_num_zsq -# def jian(self, n): -# self.__result -= n -# -# @__check_num_zsq -# def cheng(self, n): -# self.__result *= n -# -# def show(self): -# print("计算的结果是:%d" % self.__result) -# -# -# c1 = Caculator(2) -# c1.jia(6) -# c1.jian(4) -# c1.cheng(5) -# c1.show() - - -# ------------------------------------代码8-------------------------------------- -import win32com.client - -# # 1. 创建一个播报器对象 -# speaker = win32com.client.Dispatch("SAPI.SpVoice") -# -# # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 -# speaker.Speak("我的名字是sz") - -# class Caculator: -# def __check_num_zsq(func): -# def inner(self, n): -# if not isinstance(n, int): -# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") -# return func(self, n) -# -# return inner -# -# # def __say(self, word): -# # # 1. 创建一个播报器对象 -# # speaker = win32com.client.Dispatch("SAPI.SpVoice") -# # -# # # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 -# # speaker.Speak(word) -# -# def create_say_zsq(word=""): -# def __say_zsq(func): -# def inner(self, n): -# # 1. 创建一个播报器对象 -# speaker = win32com.client.Dispatch("SAPI.SpVoice") -# # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 -# speaker.Speak(word + str(n)) -# return func(self, n) -# -# return inner -# -# return __say_zsq -# -# @__check_num_zsq -# @create_say_zsq() -# def __init__(self, num): -# self.__result = num -# -# @__check_num_zsq -# @create_say_zsq("加") -# def jia(self, n): -# self.__result += n -# -# @__check_num_zsq -# @create_say_zsq("减去") -# def jian(self, n): -# self.__result -= n -# -# @__check_num_zsq -# @create_say_zsq("乘以") -# def cheng(self, n): -# self.__result *= n -# -# def show(self): -# # self.__say("计算的结果是:%d" % self.__result) -# print("计算的结果是:%d" % self.__result) -# -# c1 = Caculator(10) -# c1.jia(6) -# c1.jian(4) -# c1.cheng(5) -# c1.show() - -# ------------------------------------代码9-------------------------------------- -# import win32com.client -# -# -# class Caculator: -# def __check_num_zsq(func): -# def inner(self, n): -# if not isinstance(n, int): -# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") -# return func(self, n) -# -# return inner -# -# def __say(self, word): -# # 1. 创建一个播报器对象 -# speaker = win32com.client.Dispatch("SAPI.SpVoice") -# -# # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 -# speaker.Speak(word) -# -# def __create_say_zsq(word=""): -# def __say_zsq(func): -# def inner(self, n): -# self.__say(word + str(n)) -# return func(self, n) -# -# return inner -# return __say_zsq -# -# @__check_num_zsq -# @__create_say_zsq() -# def __init__(self, num): -# self.__result = num -# -# @__check_num_zsq -# @__create_say_zsq("加") -# def jia(self, n): -# self.__result += n -# -# @__check_num_zsq -# @__create_say_zsq("减去") -# def jian(self, n): -# self.__result -= n -# -# @__check_num_zsq -# @__create_say_zsq("乘以") -# def cheng(self, n): -# self.__result *= n -# -# def show(self): -# self.__say("计算的结果是:%d" % self.__result) -# print("计算的结果是:%d" % self.__result) -# -# c1 = Caculator(10) -# c1.jia(6) -# c1.jian(4) -# c1.cheng(5) -# c1.show() - - -# ------------------------------------代码10-------------------------------------- -# import win32com.client -# -# -# class Caculator: -# def __check_num_zsq(func): -# def inner(self, n): -# if not isinstance(n, int): -# raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") -# return func(self, n) -# -# return inner -# -# def __say(self, word): -# # 1. 创建一个播报器对象 -# speaker = win32com.client.Dispatch("SAPI.SpVoice") -# -# # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 -# speaker.Speak(word) -# -# def __create_say_zsq(word=""): -# def __say_zsq(func): -# def inner(self, n): -# self.__say(word + str(n)) -# return func(self, n) -# -# return inner -# return __say_zsq -# -# @__check_num_zsq -# @__create_say_zsq() -# def __init__(self, num): -# self.__result = num -# -# @__check_num_zsq -# @__create_say_zsq("加") -# def jia(self, n): -# self.__result += n -# -# @__check_num_zsq -# @__create_say_zsq("减去") -# def jian(self, n): -# self.__result -= n -# -# @__check_num_zsq -# @__create_say_zsq("乘以") -# def cheng(self, n): -# self.__result *= n -# -# def show(self): -# self.__say("计算的结果是:%d" % self.__result) -# print("计算的结果是:%d" % self.__result) -# -# @property -# def result(self): -# return self.__result -# -# c1 = Caculator(10) -# c1.jia(6) -# c1.jian(4) -# c1.cheng(5) -# c1.show() -# -# print(c1.result) -# c1.result = 10 - -# ------------------------------------代码11-------------------------------------- -import win32com.client - - -class Caculator: - def __check_num_zsq(func): - def inner(self, n): - if not isinstance(n, int): - raise TypeError("当前这个数据的类型有问题, 应该是一个整型数据") - return func(self, n) - - return inner - - def __say(self, word): - # 1. 创建一个播报器对象 - speaker = win32com.client.Dispatch("SAPI.SpVoice") - - # 2. 通过这个播报器对象, 直接, 播放相对应的语音字符串就可以 - speaker.Speak(word) - - def __create_say_zsq(word=""): - def __say_zsq(func): - def inner(self, n): - self.__say(word + str(n)) - return func(self, n) - - return inner - return __say_zsq - - @__check_num_zsq - @__create_say_zsq() - def __init__(self, num): - self.__result = num - - @__check_num_zsq - @__create_say_zsq("加") - def jia(self, n): - self.__result += n - return self - - @__check_num_zsq - @__create_say_zsq("减去") - def jian(self, n): - self.__result -= n - return self - - @__check_num_zsq - @__create_say_zsq("乘以") - def cheng(self, n): - self.__result *= n - return self - - def show(self): - self.__say("计算的结果是:%d" % self.__result) - print("计算的结果是:%d" % self.__result) - return self - - def clear(self): - self.__result = 0 - return self - - @property - def result(self): - return self.__result - -c1 = Caculator(10) -c1.jia(6).jian(4).cheng(5).show().clear().jia(555).jian(500).show() - -print(c1.result) - - diff --git "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" "b/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" deleted file mode 100644 index 66cb599..0000000 --- "a/02-Python346円240円270円345円277円203円351円230円266円346円256円265円344円273円243円347円240円201円/01-Python-351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" +++ /dev/null @@ -1,14 +0,0 @@ - - -class Person: - @staticmethod - def jingtai(): - print("这是一个静态方法") - - -Person.jingtai() -p = Person() -p.jingtai() - -func = Person.jingtai -func() \ No newline at end of file From 1d0c68c61f87908ed6d9e788a42e05566840ba38 Mon Sep 17 00:00:00 2001 From: sz <501562071@qq.com> Date: Fri, 2 Feb 2018 21:53:58 +0800 Subject: [PATCH 3/4] x --- .../xx.jpg" | Bin .../xx2.jpg" | Bin ...274円202円345円270円270円346円246円202円345円277円265円.py" | 0 .../other1.py" | 0 .../other2.py" | 0 .../other3.py" | 0 .../test.py" | 0 ...211271円346円200円247円-346円241円210円344円276円213円.py" | 0 .../345円244円232円346円200円201円.py" | 0 .../345円260円201円350円243円205円.py" | 0 .../347円273円247円346円211円277円.py" | 0 ...206円205円345円255円230円347円256円241円347円220円206円.py" | 0 .../classDesc.html" | 0 .../classDesc.py" | 0 .../other.py" | 0 ...275円277円347円224円250円346円226円271円345円274円217円.py" | 0 ...261236円346円200円247,円350円247円204円345円276円213円.py" | 0 ...217円252円350円257円273円345円261円236円346円200円247円.py" | 0 ...256円236円344円276円213円346円226円271円346円263円225円.py" | 0 ...224円237円345円221円275円345円221円250円346円234円237円.py" | 0 ...261円236円346円200円247円347円233円270円345円205円263円.py" | 0 ...222円214円347円273円217円345円205円270円347円261円273円.py" | 0 ...233270円345円205円263円-350円241円245円345円205円205円.py" | 0 ...226円271円346円263円225円347円233円270円345円205円263円.py" | 0 ...234円211円345円214円226円345円261円236円346円200円247円.py" | 0 ...272円224円347円224円250円345円234円272円346円231円257円.py" | 0 .../347円261円273円346円226円271円346円263円225円.py" | 0 ...261円273円347円232円204円345円256円232円344円271円211円.py" | 0 ...261円273円347円232円204円350円241円245円345円205円205円.py" | 0 ...275円256円347円232円204円345円261円236円346円200円247円.py" | 0 ...273円274円345円220円210円346円241円210円344円276円213円.py" | 0 ...235円231円346円200円201円346円226円271円346円263円225円.py" | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx.jpg" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx.jpg" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx2.jpg" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx2.jpg" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/test.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/test.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" (100%) rename "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" => "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" (100%) diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx.jpg" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx.jpg" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx.jpg" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx.jpg" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx2.jpg" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx2.jpg" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx2.jpg" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/xx2.jpg" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円/351円224円231円350円257円257円345円222円214円345円274円202円345円270円270円346円246円202円345円277円265円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other1.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other2.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/other3.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/test.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/test.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/test.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/test.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/344円270円211円345円244円247円347円211円271円346円200円247円-346円241円210円344円276円213円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円244円232円346円200円201円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/345円260円201円350円243円205円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-344円270円211円345円244円247円347円211円271円346円200円247円/347円273円247円346円211円277円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/Python345円206円205円345円255円230円347円256円241円347円220円206円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.html" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/classDesc.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/other.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/propery345円234円250円346円226円260円345円274円217円347円261円273円344円273円245円345円217円212円347円273円217円345円205円270円347円261円273円344円270円255円347円232円204円344円275円277円347円224円250円346円226円271円345円274円217円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円346円226円271円346円263円225円350円256円277円351円227円256円344円270円215円345円220円214円347円261円273円345円236円213円347円232円204円345円261円236円346円200円247,円350円247円204円345円276円213円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円217円252円350円257円273円345円261円236円346円200円247円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円256円236円344円276円213円346円226円271円346円263円225円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円257円271円350円261円241円347円232円204円347円224円237円345円221円275円345円221円250円346円234円237円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/345円261円236円346円200円247円347円233円270円345円205円263円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円260円345円274円217円347円261円273円345円222円214円347円273円217円345円205円270円347円261円273円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円-350円241円245円345円205円205円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/346円226円271円346円263円225円347円233円270円345円205円263円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円247円201円346円234円211円345円214円226円345円261円236円346円200円247円347円232円204円345円272円224円347円224円250円345円234円272円346円231円257円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円346円226円271円346円263円225円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円345円256円232円344円271円211円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円261円273円347円232円204円350円241円245円345円205円205円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円263円273円347円273円237円345円206円205円347円275円256円347円232円204円345円261円236円346円200円247円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/347円273円274円345円220円210円346円241円210円344円276円213円.py" diff --git "a/03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" "b/02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" similarity index 100% rename from "03-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" rename to "02-Python351円235円242円345円220円221円345円257円271円350円261円241円344円273円243円347円240円201円/351円235円242円345円220円221円345円257円271円350円261円241円-345円237円272円347円241円200円/351円235円231円346円200円201円346円226円271円346円263円225円.py" From ba42410f5f4220787a580b849d60e581c4f9c117 Mon Sep 17 00:00:00 2001 From: OneShunzi <501562071@qq.com> Date: 2019年3月25日 09:29:22 +0800 Subject: [PATCH 4/4] Update README.md --- README.md | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 7da56b6..bed8a36 100644 --- a/README.md +++ b/README.md @@ -3,36 +3,13 @@ Python视频教程配套源码; # 在线观看地址: -### 腾讯课堂: - https://ke.qq.com/course/list/%E7%8E%8B%E9%A1%BA%E5%AD%90#tuin=1de53ad7 - 或直接搜索"王顺子" ### 网易云课堂: - http://study.163.com/course/introduction/1004492011.htm - 或直接搜索 "王顺子" + 直接搜索 "王顺子" -### 网易云课堂: - http://study.163.com/course/introduction/1004496007.htm - 或直接搜索 "王顺子" - -### 高清视频下载地址: - 百度云盘链接: http://pan.baidu.com/s/1kVf2s31 密码: 关注公众号, 回复"密码"获取 - # 笔记地址: - 简书:关注 "百川一页" - + 添加QQ群:885843891 + # 代码地址: github: https://github.com/wangshunzi/Python_code - - -# 客服: - 关注微信公众号:"百川一页" - +QQ群:635040761 - - -

- - -
-