From d85cbb92645d6dab0fde8088693a5f2e55c0b324 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 10 Nov 2017 12:01:01 -0800 Subject: [PATCH] Fix grammar nits --- pep-0562.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pep-0562.rst b/pep-0562.rst index 93f350387..3c7f24c0b 100644 --- a/pep-0562.rst +++ b/pep-0562.rst @@ -12,7 +12,7 @@ Post-History: 09-Sep-2017 Abstract ======== -It is proposed to support ``__getattr__`` function defined on modules to +It is proposed to support a ``__getattr__`` function defined on modules to provide basic customization of module attribute access. @@ -22,7 +22,7 @@ Rationale It is sometimes convenient to customize or otherwise have control over access to module attributes. A typical example is managing deprecation warnings. Typical workarounds are assigning ``__class__`` of a module object -to a custom subclass of ``types.ModuleType`` or substituting ``sys.modules`` +to a custom subclass of ``types.ModuleType`` or replacing the ``sys.modules`` item with a custom wrapper instance. It would be convenient to simplify this procedure by recognizing ``__getattr__`` defined directly in a module that would act like a normal ``__getattr__`` method, except that it will be defined @@ -84,7 +84,7 @@ Specification ============= The ``__getattr__`` function at the module level should accept one argument -which is a name of an attribute and return the computed value or raise +which is the name of an attribute and return the computed value or raise an ``AttributeError``:: def __getattr__(name: str) -> Any: ...