[Pkg-bitcoin-commits] [python-quamash] 09/78: Update README.rst
Jonas Smedegaard
dr at jones.dk
Tue Dec 19 01:19:51 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.6.0_dfsg-1
in repository python-quamash.
commit 39de48259de42f82aa4ab3faf168ead934d5f6fd
Author: João Paulo Vanzuita <joaopaulo.mailfs at gmail.com>
Date: Mon Jan 2 22:51:38 2017 -0200
Update README.rst
Usage example in Python 3.5 (async and await take places of @decorators and yield from)
---
README.rst | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/README.rst b/README.rst
index 9e99142..2d63a6a 100644
--- a/README.rst
+++ b/README.rst
@@ -92,18 +92,16 @@ Usage
progress.setRange(0, 99)
progress.show()
- @asyncio.coroutine
- def master():
- yield from first_50()
+ async def master():
+ await first_50()
with QThreadExecutor(1) as exec:
- yield from loop.run_in_executor(exec, last_50)
+ await loop.run_in_executor(exec, last_50)
# TODO announce completion?
- @asyncio.coroutine
- def first_50():
+ await def first_50():
for i in range(50):
progress.setValue(i)
- yield from asyncio.sleep(.1)
+ await asyncio.sleep(.1)
def last_50():
for i in range(50,100):
@@ -256,4 +254,4 @@ starts with a "Q".
.. _#35: https://github.com/harvimt/quamash/issues/35
.. _#55: https://github.com/harvimt/quamash/issues/55
.. _#59: https://github.com/harvimt/quamash/pull/59
-.. _#62: https://github.com/harvimt/quamash/pull/62
\ No newline at end of file
+.. _#62: https://github.com/harvimt/quamash/pull/62
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git
More information about the Pkg-bitcoin-commits
mailing list