Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-117

Rewrite all code examples in docstrings

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.2
    • Affects Version/s: 0.7
    • Component/s: Docs
    • Labels:
      None

      Some of Motor's code examples are automatically copied from PyMongo but aren't correct for Motor. sphinx-build now warns about these (I put some logic into motor_extensions.py to catch them).

      Additionally, many of Motor's code examples use "gen.coroutine" and "yield", which are Tornado-specific. Better to use "async" and "await" in docstrings, since that's a modern style and is identical in Tornado and asyncio.

      The Tornado tutorial will still demonstrate Python 2-style code with "gen.coroutine" and "yield".

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: