commit
18974e8c82
|
@ -289,6 +289,8 @@ def get_best_trip_by_user_id(user_id):
|
|||
|
||||
这是『Python 工匠』系列文章的第一篇,不知道看完文章的你,有没有什么想吐槽的?请留言告诉我吧。
|
||||
|
||||
[>>>下一篇【2.编写条件分支代码的技巧】](2-if-else-block-secrets.md)
|
||||
|
||||
> 文章更新记录:
|
||||
>
|
||||
> - 2018.04.09:根据 @onlyice 的建议,添加了 namedtuple 部分
|
||||
|
|
|
@ -350,6 +350,10 @@ Python 世界有着一套非常复杂的规则,这些规则的涵盖范围包
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言或者在 [项目 Github Issues](https://github.com/piglei/one-python-craftsman) 告诉我吧。
|
||||
|
||||
[>>>下一篇【11.高效操作文件的三个建议】](11-three-tips-on-writing-file-related-codes.md)
|
||||
|
||||
[<<<上一篇【9.一个关于模块的小故事】](9-a-story-on-cyclic-imports.md)
|
||||
|
||||
## 附录
|
||||
|
||||
- 题图来源: Photo by JESHOOTS.COM on Unsplash
|
||||
|
|
|
@ -372,6 +372,8 @@ def parse(self, source, parser=None):
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言或者在 [项目 Github Issues](https://github.com/piglei/one-python-craftsman) 告诉我吧。
|
||||
|
||||
[<<<上一篇【10.做一个精通规则的玩家】](10-a-good-player-know-the-rules.md)
|
||||
|
||||
## 附录
|
||||
|
||||
- 题图来源: Photo by Devon Divine on Unsplash
|
||||
|
|
|
@ -378,6 +378,10 @@ True
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言告诉我吧。
|
||||
|
||||
[>>>下一篇【3.使用数字与字符串的技巧】](3-tips-on-numbers-and-strings.md)
|
||||
|
||||
[<<<上一篇【1.善用变量来改善代码质量】](1-using-variables-well.md)
|
||||
|
||||
## 注解
|
||||
|
||||
1. <a id="annot1"></a>事实上 `x and a or b` 不是总能给你正确的结果,只有当 a 与 b 的布尔值为真时,这个表达式才能正常工作,这是由逻辑运算的短路特性决定的。你可以在命令行中运行 `True and None or 0` 试试看,结果是 0 而非 None。
|
||||
|
|
|
@ -386,4 +386,8 @@ Python 的字符串拼接在 2.2 以及之前的版本确实很慢,和我最
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言或者在 [项目 Github Issues](https://github.com/piglei/one-python-craftsman) 告诉我吧。
|
||||
|
||||
[>>>下一篇【4.容器的门道】](4-mastering-container-types.md)
|
||||
|
||||
[<<<上一篇【2.编写条件分支代码的技巧】](2-if-else-block-secrets.md)
|
||||
|
||||
|
||||
|
|
|
@ -465,6 +465,10 @@ print(numbers)
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言或者在 [项目 Github Issues](https://github.com/piglei/one-python-craftsman) 告诉我吧。
|
||||
|
||||
[>>>下一篇【5.让函数返回结果的技巧】](5-function-returning-tips.md)
|
||||
|
||||
[<<<上一篇【3.编写条件分支代码的技巧】](3-tips-on-numbers-and-strings.md)
|
||||
|
||||
## 系列其他文章
|
||||
|
||||
- [所有文章索引 [Github]](https://github.com/piglei/one-python-craftsman)
|
||||
|
|
|
@ -390,6 +390,10 @@ def foo_func(items):
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言或者在 [项目 Github Issues](https://github.com/piglei/one-python-craftsman) 告诉我吧。
|
||||
|
||||
[>>>下一篇【6.异常处理的三个好习惯】](6-three-rituals-of-exceptions-handling.md)
|
||||
|
||||
[<<<上一篇【4.容器的门道】](4-mastering-container-types.md)
|
||||
|
||||
## 附录
|
||||
|
||||
- 题图来源: Dominik Scythe on Unsplash
|
||||
|
|
|
@ -307,6 +307,10 @@ def upload_avatar(request):
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言或者在 [项目 Github Issues](https://github.com/piglei/one-python-craftsman) 告诉我吧。
|
||||
|
||||
[>>>下一篇【7.编写地道循环的两个建议】](7-two-tips-on-loop-writing.md)
|
||||
|
||||
[<<<上一篇【5.让函数返回结果的技巧】](5-function-returning-tips.md)
|
||||
|
||||
## 附录
|
||||
|
||||
- 题图来源: Photo by Bernard Hermant on Unsplash
|
||||
|
|
|
@ -304,6 +304,10 @@ def notify_nonsleep_users_in_last_30days():
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言或者在 [项目 Github Issues](https://github.com/piglei/one-python-craftsman) 告诉我吧。
|
||||
|
||||
[>>>下一篇【8.使用装饰器的技巧】](8-tips-on-decorators.md)
|
||||
|
||||
[<<<上一篇【6.异常处理的三个好习惯】](6-three-rituals-of-exceptions-handling.md)
|
||||
|
||||
## 附录
|
||||
|
||||
- 题图来源: Photo by Lai man nung on Unsplash
|
||||
|
|
|
@ -341,6 +341,10 @@ def decorated(*args, **kwargs):
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言或者在 [项目 Github Issues](https://github.com/piglei/one-python-craftsman) 告诉我吧。
|
||||
|
||||
[>>>下一篇【9.一个关于模块的小故事】](9-a-story-on-cyclic-imports.md)
|
||||
|
||||
[<<<上一篇【7.编写地道循环的两个建议】](7-two-tips-on-loop-writing.md)
|
||||
|
||||
|
||||
## 附录
|
||||
|
||||
|
|
|
@ -178,6 +178,10 @@ from .msg_utils import send_sms
|
|||
|
||||
看完文章的你,有没有什么想吐槽的?请留言或者在 [项目 Github Issues](https://github.com/piglei/one-python-craftsman) 告诉我吧。
|
||||
|
||||
[>>>下一篇【10.做一个精通规则的玩家】](10-a-good-player-know-the-rules.md)
|
||||
|
||||
[<<<上一篇【8.使用装饰器的技巧】](8-tips-on-decorators.md)
|
||||
|
||||
## 附录
|
||||
|
||||
- 题图来源: Photo by Ricardo Gomez Angel on Unsplash
|
||||
|
|
Loading…
Reference in New Issue