h2non / paco

Small utility library for coroutine-driven asynchronous generic programming in Python
http://paco.rtfd.io
MIT License
202 stars 13 forks source link

Add examples #12

Closed h2non closed 7 years ago

Gr1N commented 7 years ago

Hi,

I don't know what about this task, but I want to help and improve existing docstrings, because:

Below you can find my ideas about how to improve current examples.

  1. python repl + paco.run

    
    diff --git a/paco/partial.py b/paco/partial.py
    index 341cf49..c76ea47 100755
    --- a/paco/partial.py
    +++ b/paco/partial.py
    @@ -24,8 +24,14 @@ def partial(coro, *args, **kw):
    
     Usage::
  1. ipython repl + paco.run

    
    diff --git a/paco/partial.py b/paco/partial.py
    index 341cf49..24296c4 100755
    --- a/paco/partial.py
    +++ b/paco/partial.py
    @@ -24,8 +24,14 @@ def partial(coro, *args, **kw):
    
     Usage::
  1. just code with await syntax

    
    diff --git a/paco/partial.py b/paco/partial.py
    index 341cf49..444f031 100755
    --- a/paco/partial.py
    +++ b/paco/partial.py
    @@ -24,8 +24,15 @@ def partial(coro, *args, **kw):
    
     Usage::

@h2non what do you think? Any ideas?

h2non commented 7 years ago

I like doctest style (the first one), but I found more versatile the last one, so I would bet for last one.

I'm very open to introduce any enhancements in this sense that leverages overall library quality and makes it more easy to consume.

Any PR would be appreciated.

h2non commented 7 years ago

I think we are fine in terms of example code for now. Closing issue.