Skip to content

Commit

Permalink
Merge pull request #250 from hustcsxg/master
Browse files Browse the repository at this point in the history
修改错别字
  • Loading branch information
yidao620c committed Nov 17, 2018
2 parents a5d62bd + f0b94f8 commit e83f233
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/c12/p06_storing_thread_specific_state.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
del self.local.sock
代码中,自己观察对于 ``self.local`` 属性的使用。
它被初始化尾一个 ``threading.local()`` 实例。
它被初始化为一个 ``threading.local()`` 实例。
其他方法操作被存储为 ``self.local.sock`` 的套接字对象。
有了这些就可以在多线程中安全的使用 ``LazyConnection`` 实例了。例如:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
out_bytes = subprocess.check_output('grep python | wc > out', shell=True)
需要注意的是在shell中执行命令会存在一定的安全风险,特别是当参数来自于用户输入时。
这时候可以使用 ``shlex.quote()`` 函数来讲参数正确的用双引用引起来
这时候可以使用 ``shlex.quote()`` 函数来将参数正确的用双引用引起来

----------
讨论
Expand Down

0 comments on commit e83f233

Please sign in to comment.