Add revision history (#1346)

This commit is contained in:
sweeneyde 2020-03-28 20:18:13 -04:00 committed by GitHub
parent a108290289
commit 38debf93e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 4 deletions

View File

@ -65,8 +65,9 @@ as follows when ``type(self) is type(prefix) is type(suffix) is str``::
else:
return self[:]
These methods, even when called on ``str`` subclasses, should always
return base ``str`` objects.
When the arguments are instances of ``str`` subclasses, the methods should
behave as though those arguments were first coerced to base ``str``
objects, and the return value should always be a base ``str``.
Methods with the corresponding semantics will be added to the builtin
``bytes`` and ``bytearray`` objects. If ``b`` is either a ``bytes``
@ -92,7 +93,7 @@ one or more of the following:
3. More descriptive:
The methods give a higher-level API for code readability, as
The methods give a higher-level API for code readability as
opposed to the traditional method of string slicing.
@ -226,7 +227,7 @@ principle.
Accepting a tuple of affixes
-----------------------------
----------------------------
It could be convenient to write the ``test_concurrent_futures.py``
example above as ``name.removesuffix(('Mixin', 'Tests', 'Test'))``, so
@ -296,6 +297,17 @@ Reference Implementation
See the pull request on GitHub [#pr]_.
History of Major revisions
==========================
* Version 3: Remove tuple behavior.
* Version 2: Changed name to ``removeprefix``/``removesuffix``;
added support for tuples as arguments
* Version 1: Initial draft with ``cutprefix``/``cutsuffix``
References
==========