Message222991
| Author |
ncoghlan |
| Recipients |
gvanrossum, lemburg, martin.panter, ncoghlan, terry.reedy |
| Date |
2014年07月14日.02:00:38 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CADiSq7e+jxh6gER-rJRTFPmF06SAv6US3FCSi-M4mofun1-+zg@mail.gmail.com> |
| In-reply-to |
<1405291178.15.0.268055963435.issue21777@psf.upfronthosting.co.za> |
| Content |
On 13 Jul 2014 18:39, "Marc-Andre Lemburg" <report@bugs.python.org> wrote:
>
>
> Marc-Andre Lemburg added the comment:
>
> Why are you removing guarantees like these from the str docs:
>
> "The original string is returned if *width* is less than or equal to
``len(s)``."
Because it's untrue for bytearray, and possible object reuse is a general
characteristic of immutability for str and bytes. If another implementation
makes a copy for some reason, it would still be considered "Python".
Since the sentence thus conveys no useful information, I removed it from
both the text and binary variants rather than coming up with appropriate
wording to indicate that the behaviour of returning a new reference to the
existing object when no content changes are needed doesn't apply to the
mutable bytearray.
>
> ?
>
> This doesn't seem to have anything to do with documenting bytes and
bytearrays.
>
> ----------
> nosy: +lemburg
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue21777>
> _______________________________________ |
|