提交 39283c4b 编写于 作者: J Jeff Widman

"while 1" --> "while True"

This is python, not C
上级 0d6c5f28
......@@ -276,7 +276,7 @@ could do something like this:
.. code-block:: pycon
>>> with r.pipeline() as pipe:
... while 1:
... while True:
... try:
... # put a WATCH on the key that holds our sequence value
... pipe.watch('OUR-SEQUENCE-KEY')
......@@ -309,7 +309,7 @@ explicitly calling reset():
.. code-block:: pycon
>>> pipe = r.pipeline()
>>> while 1:
>>> while True:
... try:
... pipe.watch('OUR-SEQUENCE-KEY')
... ...
......
......@@ -579,7 +579,7 @@ class StrictRedis(object):
value_from_callable = kwargs.pop('value_from_callable', False)
watch_delay = kwargs.pop('watch_delay', None)
with self.pipeline(True, shard_hint) as pipe:
while 1:
while True:
try:
if watches:
pipe.watch(*watches)
......
......@@ -107,7 +107,7 @@ class Lock(object):
stop_trying_at = None
if blocking_timeout is not None:
stop_trying_at = mod_time.time() + blocking_timeout
while 1:
while True:
if self.do_acquire(token):
self.local.token = token
return True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册