In article <52eb1e37$0$29972$c3e8da3$54964...@news.astraweb.com>,
 Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote:

> "replace" is a perfectly reasonable name for a method which performs a 
> replacement, whether it replaces in place (for mutable objects) or makes 
> a copy with replacement (for immutable objects). What else would you call 
> it?

I suppose that by (imperfect) analogy to list.sort() and sorted(list), 
it might make more sense to call it replaced().  But, it's too late for 
any of that now.  The other three classes in the module have replace(), 
so that's the obvious name to use for the fourth class.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to