Charles R Harris wrote:
Here's a better doc string that explains "This will be a new view object if possible; otherwise, it will return a copy."
Does this exist somewhere, or are you contributing it now?
I think that it should raise an error, or warn, if it needs to make a copy,
I totally agree, and that behavior matches the current ('1.0.2') docstring.
but that isn't the tradition.
so sad -- could this be deprecated. I know we had a pretty length discussion about this issue in another context. In general, it's a bad idea for methods to sometimes return copies and sometimes views -- it's begging for subtle bugs!
oh well, either the code or the docstring should change, in any case.