代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/python-futures 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 765e7e17975477b4e2fa60256007c970057e018d Mon Sep 17 00:00:00 2001
From: Lisandro Dalcin <dalcinl@gmail.com>
Date: Tue, 3 Oct 2017 21:35:10 +0300
Subject: [PATCH] Make Future.__repr__ subclass-friendly (bpo-22033) (#65)
+ https://bugs.python.org/issue22033
Minor spelling fixes in docstrings (bpo-25523)
+ https://bugs.python.org/issue25523
---
concurrent/futures/_base.py | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/concurrent/futures/_base.py b/concurrent/futures/_base.py
index ca2ebfb..401e488 100644
--- a/concurrent/futures/_base.py
+++ b/concurrent/futures/_base.py
@@ -322,17 +322,20 @@ class Future(object):
with self._condition:
if self._state == FINISHED:
if self._exception:
- return '<Future at %s state=%s raised %s>' % (
- hex(id(self)),
+ return '<%s at %#x state=%s raised %s>' % (
+ self.__class__.__name__,
+ id(self),
_STATE_TO_DESCRIPTION_MAP[self._state],
self._exception.__class__.__name__)
else:
- return '<Future at %s state=%s returned %s>' % (
- hex(id(self)),
+ return '<%s at %#x state=%s returned %s>' % (
+ self.__class__.__name__,
+ id(self),
_STATE_TO_DESCRIPTION_MAP[self._state],
self._result.__class__.__name__)
- return '<Future at %s state=%s>' % (
- hex(id(self)),
+ return '<%s at %#x state=%s>' % (
+ self.__class__.__name__,
+ id(self),
_STATE_TO_DESCRIPTION_MAP[self._state])
def cancel(self):
@@ -355,7 +358,7 @@ class Future(object):
return True
def cancelled(self):
- """Return True if the future has cancelled."""
+ """Return True if the future was cancelled."""
with self._condition:
return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]
@@ -573,7 +576,7 @@ class Executor(object):
raise NotImplementedError()
def map(self, fn, *iterables, **kwargs):
- """Returns a iterator equivalent to map(fn, iter).
+ """Returns an iterator equivalent to map(fn, iter).
Args:
fn: A callable that will take as many arguments as there are
--
2.37.0.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。