02 2021 档案
python 的<< >> 移位运算符、按位与(&),按位或(|),按位翻转(~)
摘要:python的二进制运算符 python 的<< >> 移位运算符、按位与(&),按位或(|),按位翻转(~)。这些运算符中只有按位翻转运算符是单目运算符,其他的都是双目运算符。 1.>> 和 <<都是位运算,对二进制数进行移位操作。<< 是左移,末位补0,类比十进制数在末尾添0相当于原数zhuan
阅读全文
内置fixture --request的用法(pytest_addoption 注册、pytestconfig 获取命令行参数 )
摘要:pytest_addoption 注册、pytestconfig 获取命令行参数 : pytest_addoption 可以让用户注册一个自定义的命令行参数,方便用户将数据传递给 pytest; 这个 Hook 方法一般和 内置 fixture pytestconfig 配合使用,pytest_ad
阅读全文
namedtuple
摘要:new python 3.6 ,we can use a class definition with typing.NamedTuple to create a namedtuple: from typing import NamedTuple class ANamedTuple(NamedTupl
阅读全文
初识c语言(数据类型 作用域 生命周期)
摘要:1.c语言工程文件 .c表示源文件 .h表示头文件 2.第一个c语言程序 stdio.h表示 standard input output的头文件,使用printf 需要include <stdio.h> # include <stdio.h> int main() { printf("#####")
阅读全文