Skip to content

Use https for iswbm.com #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
![](http://image.iswbm.com/20200719231251.png)
![](https://image.iswbm.com/20200719231251.png)

<p align="center">
<a href="http://image.iswbm.com/20200816082224.png"><img src="https://img.shields.io/badge/Talk-%E5%BE%AE%E4%BF%A1%E7%BE%A4-brightgreen.svg?style=popout-square" alt="微信"></a>
<a href="https://image.iswbm.com/20200816082224.png"><img src="https://img.shields.io/badge/Talk-%E5%BE%AE%E4%BF%A1%E7%BE%A4-brightgreen.svg?style=popout-square" alt="微信"></a>
<a href="https://github.com/iswbm/magic-python/stargazers"><img src="https://img.shields.io/github/stars/iswbm/magic-python.svg?style=popout-square" alt="GitHub stars"></a>
<a href="https://github.com/iswbm/magic-python/issues"><img src="https://img.shields.io/github/issues/iswbm/magic-python.svg?style=popout-square" alt="GitHub issues"></a>
<img src='https://img.shields.io/badge/language-Python-blue.svg' alt="Build Status">
<img src='https://img.shields.io/badge/framwork-Sphinx-green.svg'>
<a href='https://www.zhihu.com/people/wongbingming'><img src='https://img.shields.io/badge/dynamic/json?color=0084ff&logo=zhihu&label=%E7%8E%8B%E7%82%B3%E6%98%8E&query=%24.data.totalSubs&url=https%3A%2F%2Fapi.spencerwoo.com%2Fsubstats%2F%3Fsource%3Dzhihu%26queryKey%3Dwongbingming'></a>
<a href='https://juejin.im/user/5b08d982f265da0db3502c55'><img src='https://img.shields.io/badge/掘金-2481-blue'></a>
<a href='http://image.iswbm.com/20200607114246.png'><img src='http://img.shields.io/badge/%E5%85%AC%E4%BC%97%E5%8F%B7-60k+-brightgreen'></a>
<a href='https://image.iswbm.com/20200607114246.png'><img src='http://img.shields.io/badge/%E5%85%AC%E4%BC%97%E5%8F%B7-60k+-brightgreen'></a>
</p>


Expand Down
16 changes: 8 additions & 8 deletions md2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,32 @@
# 没有文件变更
os._exit(0)

base_link = "http://python.iswbm.com/en/latest/"
base_link = "https://python.iswbm.com/en/latest/"
readme_header = '''
![](http://image.iswbm.com/20200607120940.png)
![](https://image.iswbm.com/20200607120940.png)

<p align="center">
<img src='https://img.shields.io/badge/language-Python-blue.svg' alt="Build Status">
<img src='https://img.shields.io/badge/framwork-Sphinx-green.svg'>
<a href='https://www.zhihu.com/people/wongbingming'><img src='https://img.shields.io/badge/dynamic/json?color=0084ff&logo=zhihu&label=%E7%8E%8B%E7%82%B3%E6%98%8E&query=%24.data.totalSubs&url=https%3A%2F%2Fapi.spencerwoo.com%2Fsubstats%2F%3Fsource%3Dzhihu%26queryKey%3Dwongbingming'></a>
<a href='https://juejin.im/user/5b08d982f265da0db3502c55'><img src='https://img.shields.io/badge/掘金-2481-blue'></a>
<a href='http://image.iswbm.com/20200607114246.png'><img src='http://img.shields.io/badge/%E5%85%AC%E4%BC%97%E5%8F%B7-30k+-brightgreen'></a>
<a href='https://image.iswbm.com/20200607114246.png'><img src='http://img.shields.io/badge/%E5%85%AC%E4%BC%97%E5%8F%B7-30k+-brightgreen'></a>
</p>

## [项目主页](http://python.iswbm.com/)
## [项目主页](https://python.iswbm.com/)

在线阅读:[Python 编程时光](http://python.iswbm.com/)
在线阅读:[Python 编程时光](https://python.iswbm.com/)

![](http://image.iswbm.com/20200607130051.png)
![](https://image.iswbm.com/20200607130051.png)

## 文章结构

![](http://image.iswbm.com/20200607131339.png)
![](https://image.iswbm.com/20200607131339.png)

'''
readme_tooter = '''
---
![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)

'''

Expand Down
2 changes: 1 addition & 1 deletion pdf_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
if fileinput.isfirstline():
count += 1
if count%5 == 0:
write("![](http://image.iswbm.com/20210523153308.png)", end="\n\n")
write("![](https://image.iswbm.com/20210523153308.png)", end="\n\n")

if line.startswith("# "):
line = line.replace("# ", "## ")
Expand Down
2 changes: 1 addition & 1 deletion source/_static/js/readmore.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/aboutme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

--------------------------------------------

.. image:: http://image.iswbm.com/20200607174235.png
.. image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_01.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 1.1 默默无闻的省略号很好用

![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

在Python中,一切皆对象,省略号也不例外。

Expand Down Expand Up @@ -63,4 +63,4 @@ ok



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_01.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_02.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 1.2 使用 end 来结束代码块

![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

有不少编程语言,循环、判断代码块需要用 end 标明结束,这样一定程度上会使代码逻辑更加清晰一点。

Expand Down Expand Up @@ -34,4 +34,4 @@ print(my_abs(-10))



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_02.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_03.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.3 可直接运行的 zip 包
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

我们可以经常看到有 Python 包,居然可以以 zip 包进行发布,并且可以不用解压直接使用。

Expand Down Expand Up @@ -36,4 +36,4 @@ def add(x, y):



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_03.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_04.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.4 反斜杠的倔强: 不写最后
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

`\` 在 Python 中的用法主要有两种

Expand Down Expand Up @@ -50,4 +50,4 @@ SyntaxError: EOL while scanning string literal



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_04.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_05.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.5 如何修改解释器提示符
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

这个当做今天的一个小彩蛋吧。应该算是比较冷门的,估计知道的人很少了吧。

Expand Down Expand Up @@ -33,4 +33,4 @@ Python编程时光>>>for i in range(2):



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_05.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_06.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.6 简洁而优雅的链式比较
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

先给你看一个示例:

Expand All @@ -26,4 +26,4 @@ False

这个用法叫做链式比较。

![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_06.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_07.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.7 and 和 or 的短路效应
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

and 和 or 是我们再熟悉不过的两个逻辑运算符,在 Python 也有它的妙用。

Expand All @@ -16,4 +16,4 @@ and 和 or 是我们再熟悉不过的两个逻辑运算符,在 Python 也有



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_07.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ and 和 or 是我们再熟悉不过的两个逻辑运算符,在 Python 也有

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_08.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.8 连接多个列表最极客的方式
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

```python
>>> a = [1,2]
Expand All @@ -10,4 +10,4 @@
[1, 2, 3, 4, 5, 6]
```

![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_08.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_09.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.9 字典居然是可以排序的?
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

在 Python 3.6 之前字典不可排序的思想,似乎已经根深蒂固。

Expand All @@ -23,4 +23,4 @@



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_09.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_10.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.10 哪些情况下不需要续行符?
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

在写代码时,为了代码的可读性,代码的排版是尤为重要的。

Expand Down Expand Up @@ -47,4 +47,4 @@ talk is cheap,show me the code.



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_11.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.11 用户无感知的小整数池
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

为避免整数频繁申请和销毁内存空间,Python 定义了一个小整数池 [-5, 256] 这些整数对象是提前建立好的,不会被垃圾回收。

Expand Down Expand Up @@ -30,4 +30,4 @@ True

因为当你在同一行里,同时给两个变量赋同一值时,解释器知道这个对象已经生成,那么它就会引用到同一个对象。如果分成两行的话,解释器并不知道这个对象已经存在了,就会重新申请内存存放这个对象。

![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_12.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.12 神奇的 intern 机制
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

字符串类型作为Python中最常用的数据类型之一,Python解释器为了提高字符串使用的效率和使用性能,做了很多优化。

Expand Down Expand Up @@ -41,4 +41,4 @@ False



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ intern(字符串驻留)的技术来提高字符串效率,什么是intern

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_13.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.13 site-packages和 dist-packages
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

如果你足够细心,你会在你的机器上,有些包是安装在 **site-packages** 下,而有些包安装在 **dist-packages** 下。

Expand All @@ -21,4 +21,4 @@ Debian 这么设计的原因,是为了减少不同来源的 Python 之间产



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
4 changes: 2 additions & 2 deletions source/c01/c01_13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Debian 这么设计的原因,是为了减少不同来源的 Python 之间产

|image1|

.. |image0| image:: http://image.iswbm.com/20200804124133.png
.. |image1| image:: http://image.iswbm.com/20200607174235.png
.. |image0| image:: https://image.iswbm.com/20200804124133.png
.. |image1| image:: https://image.iswbm.com/20200607174235.png

4 changes: 2 additions & 2 deletions source/c01/c01_14.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.14 argument 和 parameter 的区别?
![](http://image.iswbm.com/20200804124133.png)
![](https://image.iswbm.com/20200804124133.png)

arguments 和 parameter 的翻译都是参数,在中文场景下,二者混用基本没有问题,毕竟都叫参数嘛。

Expand All @@ -19,4 +19,4 @@ output_msg("error")



![](http://image.iswbm.com/20200607174235.png)
![](https://image.iswbm.com/20200607174235.png)
Loading