On 10/15/07, Gregory P. Smith <[EMAIL PROTECTED]> wrote:
> On 10/15/07, Terry Reedy <[EMAIL PROTECTED]> wrote:

> > ...I would think that being able to edit in place would be a reason
> > to use a buffer rather than (immutable) bytes.

> I agree, thats a benefit of a mutable object.  But I think the point about
> not reusing the names with a different behavior is valid so that some
> code can be written to operate on objects with duck type without
> having to know if its mutable or not.

I thought that was the reason to return self instead of None.

If returning the original (but mutated) buffer is a problem, then
there is already a problem, because someone else could already mutate
the original.

(Also note that for duck-typing, it should be OK if the new result
object is always immutable, since you have to handle that case
anyhow.)

-jJ
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to