title: Correctly using loop.create_future
body: <p>I was reading the Python documentation and <a href="https://pymotw.com/3/index.html" rel="noreferrer">PyMotW</a> book trying to learn Async/Await, Futures, and Tasks. </p>
  
  <p><a href="https://docs.python.org/3/library/asyncio-task.html#coroutines" rel="noreferrer">Coroutines and Tasks documentation</a>:</p>
  
  <blockquote>
    <p>Normally there is no need to create Future objects at the application
    level code.</p>
  </blockquote>
  
  <p>From the <a href="https://docs.python.org/3/library/asyncio-eventloop.html#creating-futures-and-tasks" rel="noreferrer">future documentation</a> it states the following: </p>
  
  <blockquote>
    <p>loop.create_future()</p>
    
    <p>Create an asyncio.Future object attached to the event loop.</p>
    
    <p>This is the preferred way to create Futures in asyncio. This lets third-party event loops provide alternative implementations of the
    Future object (with better performance or instrumentation).</p>
  </blockquote>
  
  <p>However, in <a href="https://pymotw.com/3/asyncio/futures.html#waiting-for-a-future" rel="noreferrer">PyMotW chapter on Future</a>, the author creates a <code>future</code> object like this:</p>
  
  <pre><code>all_done = asyncio.Future()
  </code></pre>
  
  <p>I assume because the book is slightly behind the current version of Python. To correct this, I did the following:</p>
  
  <pre><code>future_Obj = event_loop.create_future()
  </code></pre>
  
  <p>So the authors full code becomes:</p>
  
  <pre><code>import asyncio
  
  
  def mark_done(future, result):
      print('setting future result to {!r}'.format(result))
      future.set_result(result)
  
  
  event_loop = asyncio.get_event_loop()
  
  try:
  
      future_Obj = event_loop.create_future()
      print('scheduling mark_done')
      event_loop.call_soon(mark_done, future_Obj, 'the result')
  
      print('entering event loop')
      result = event_loop.run_until_complete(future_Obj)
      print('returned result: {!r}'.format(result))
  finally:
      print('closing event loop')
      event_loop.close()
  
  print('future result: {!r}'.format(future_Obj.result()))
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>Is <code>future_Obj = event_loop.create_future()</code> in the sample above, the correct way to create a <code>future</code> object according to the documentation?</p>