Skip to content

Commit

Permalink
Clarified docs for Python 2 and added limitations
Browse files Browse the repository at this point in the history
Details:

* Docs: In the Introduction section, removed statements about the nocasedict
  behavior in Python 2.

* Docs: In the Introduction section, documented the limitation that 'd | other'
  and 'd |= other' which were added to the standard Pyton 'dict' class in Python
  3.9 are not yet supported by nocasedict.

Signed-off-by: Andreas Maier <[email protected]>
  • Loading branch information
andy-maier committed May 5, 2024
1 parent 5bdd995 commit 06abbd1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
9 changes: 8 additions & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,21 @@ Released: not yet
dependencies, and added a step to the test workflow that runs it.
(issue #176)

* Docs: In the Introduction section, documented the limitation that 'd | other'
and 'd |= other' which were added to the standard Pyton 'dict' class in Python
3.9 are not yet supported by nocasedict.
**Cleanup:**

* Dev: Removed description of stable branches in development.rst because this
project maintains only the master branch. (issue #171)

* Converted percent-style and format() basedd string formatting to f-strings.
* Converted percent-style and format() based string formatting to f-strings.
(issue #174)

* Docs: In the Introduction section, removed statements about the nocasedict
behavior in Python 2.

**Known issues:**

* See `list of open issues`_.
Expand Down
12 changes: 5 additions & 7 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ Example:
NocaseDict({'Alpha': 1, 'Beta': 2})
The :class:`~nocasedict.NocaseDict` class supports the functionality of the
built-in `dict class of Python 3.8`_ on all Python versions it supports with
the following exceptions (and the case-insensitivity of course):
built-in `dict class of Python 3.8`_ on all Python versions it supports.

* The ``iter..()``, ``view..()`` and ``has_key()`` methods are only present
on Python 2, consistent with the built-in ``dict`` class.
Limitation: Any functionalities added to the ``dict`` class in Python 3.9 or
later are not yet supported. These are:

* The ``keys()``, ``values()`` and ``items()`` methods return a list on Python 2
and a dictionary view on Python 3, consistent with the built-in ``dict``
class.
* ``d | other`` - Added in Python 3.9.
* ``d |= other`` - Added in Python 3.9.

.. _dict class of Python 3.8: https://docs.python.org/3.8/library/stdtypes.html#dict

Expand Down

0 comments on commit 06abbd1

Please sign in to comment.