自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 类的装饰器应用

def Typed(**kwargs): def deco(obj): for key,val in kwargs.items(): # obj.key=val setattr(obj,key,val) return obj return deco @Typed(x=1,y=2,z=3) #1....

2018-11-26 15:38:01 117

原创 python 描述符的应用

# def test(x): # print('===>',x) # # test('alex') # test(111111) class Typed: def __init__(self,key,expected_type): self.key=key self.expected_type=expected_type def ...

2018-11-26 13:46:04 123

原创 微信小程序一些记录

fromid 那个谁获得的只能给谁用!!! 通过客服消息也可以获取openid  

2018-11-26 11:00:38 325

原创 python 迭代器协议斐波那契数列

class Fib: def __init__(self): self._a=1 self._b=1 def __iter__(self): return self def __next__(self): if self._a > 100: raise StopIteratio...

2018-11-14 17:19:05 231

转载 python包标准类型和动态导入模块和多态和反射和授权

class List(list): def append(self, p_object): if type(p_object) is str: # self.append(p_object) super().append(p_object) else: print('只能添加字符串类型...

2018-11-12 09:34:20 207

原创 python3 新式类的继承顺序 广度优先

2018-11-08 16:54:24 760

原创 printf 输出字符串 需要加上 c_str()

#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> using namespace std; int main(){ string s = "哈哈"; cout << s << endl; printf("a=%s", s.c_str()); ...

2018-11-05 11:46:09 2090

原创 python hashlib

import hashlib obj=hashlib.md5() # obj.update("admin".encode("utf8")) # print(obj.hexdigest()) #21232f297a57a5a743894a0e4a801fc3 obj.update("adminroot".encode("utf8")) print(obj.hexdigest())# ...

2018-11-01 16:30:23 209

转载 python configparser模块

# import configparser # # config = configparser.ConfigParser() #config={} # # # # # config["DEFAULT"] = {'ServerAliveInterval': '45', # 'Compression': 'yes', # ...

2018-11-01 16:10:21 156

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除