Python学习
咒王
这个作者很懒,什么都没留下…
展开
-
Python类继承
#!/usr/bin/python# Filename: inherit.pyclass SchoolMember: '''Represents any school member.''' def __init__(self, name, age): self.name = name self.age = age转载 2016-08-11 11:13:51 · 372 阅读 · 0 评论 -
unittest中常用的assert语句
unittest模块的常用方法:assertEqual(a, b) a == b assertNotEqual(a, b) a != b assertTrue(x) bool(x) is True assertFalse(x) bool(x) is False assertIs(a, b)转载 2016-09-06 15:31:19 · 2230 阅读 · 0 评论 -
Python3 安装pip 命令
Ensure you can run pip from the command lineAdditionally, you’ll need to make sure you have pip available. You can check this by running:pip --versionIf you installed Python from source, with ...原创 2018-10-27 22:03:38 · 1649 阅读 · 0 评论 -
修改PIP安装源为清华镜像地址
pypi 镜像使用帮助pypi 镜像每 5 分钟同步一次。临时使用pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package注意,simple 不能少, 是 https 而不是 http设为默认升级 pip 到最新的版本 (>=10.0.0) 后进行配置:pip install p...原创 2018-10-27 22:07:35 · 8738 阅读 · 0 评论