pep-567: Fix nits/typos (#541)

This commit is contained in:
Yury Selivanov 2018-01-17 11:13:59 -05:00 committed by GitHub
parent 583a14f814
commit c25174f10d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -108,12 +108,12 @@ Specification
A new standard library module ``contextvars`` is added with the
following APIs:
1. ``copy_context() -> Context`` function is used to get a copy of
1. The ``copy_context() -> Context`` function is used to get a copy of
the current ``Context`` object for the current OS thread.
2. ``ContextVar`` class to declare and access context variables.
2. The ``ContextVar`` class to declare and access context variables.
3. ``Context`` class encapsulates context state. Every OS thread
3. The ``Context`` class encapsulates context state. Every OS thread
stores a reference to its current ``Context`` instance.
It is not possible to control that reference directly.
Instead, the ``Context.run(callable, *args, **kwargs)`` method is
@ -329,7 +329,7 @@ dictionary using Hash Array Mapped Tries (HAMT); see :pep:`550`
for analysis of HAMT performance [1]_.
For the purposes of this section, we implement an immutable dictionary
using a copy-on-write approach and built-in dict type::
using a copy-on-write approach and the built-in dict type::
class _ContextData:
@ -658,7 +658,7 @@ Such code can be converted to use the ``contextvars`` module::
precision.set(0.5)
# To read the current precision:
precision.get()
print(precision.get())
Offloading execution to other threads