From: Martin Panter Date: Thu, 28 Jul 2016 01:30:58 +0000 (+0000) Subject: Issue #27626: Merge spelling fixes from 3.5 X-Git-Tag: v3.6.0a4~107 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8bde9111157e0eb994159c1506b1cec86298f810;p=python Issue #27626: Merge spelling fixes from 3.5 --- 8bde9111157e0eb994159c1506b1cec86298f810 diff --cc Doc/library/os.rst index eae724936f,4265bc23a1..9456733bec --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@@ -1938,24 -1900,10 +1938,24 @@@ features On Unix, *path* can be of type :class:`str` or :class:`bytes` (use :func:`~os.fsencode` and :func:`~os.fsdecode` to encode and decode :class:`bytes` paths). On Windows, *path* must be of type :class:`str`. - On both sytems, the type of the :attr:`~os.DirEntry.name` and - On both systems, the type of the :attr:`~DirEntry.name` and - :attr:`~DirEntry.path` attributes of each :class:`DirEntry` will be of ++ On both systems, the type of the :attr:`~os.DirEntry.name` and + :attr:`~os.DirEntry.path` attributes of each :class:`os.DirEntry` will be of the same type as *path*. + The :func:`scandir` iterator supports the :term:`context manager` protocol + and has the following method: + + .. method:: scandir.close() + + Close the iterator and free acquired resources. + + This is called automatically when the iterator is exhausted or garbage + collected, or when an error happens during iterating. However it + is advisable to call it explicitly or use the :keyword:`with` + statement. + + .. versionadded:: 3.6 + The following example shows a simple use of :func:`scandir` to display all the files (excluding directories) in the given *path* that don't start with ``'.'``. The ``entry.is_file()`` call will generally not make an additional diff --cc Lib/idlelib/parenmatch.py index e98fac1952,47e10f3517..14281141f8 --- a/Lib/idlelib/parenmatch.py +++ b/Lib/idlelib/parenmatch.py @@@ -5,11 -5,11 +5,11 @@@ paren. Paren here is used generically parentheses, square brackets, and curly braces. """ -from idlelib.HyperParser import HyperParser -from idlelib.configHandler import idleConf +from idlelib.hyperparser import HyperParser +from idlelib.config import idleConf _openers = {')':'(',']':'[','}':'{'} - CHECK_DELAY = 100 # miliseconds + CHECK_DELAY = 100 # milliseconds class ParenMatch: """Highlight matching parentheses