-0.5 from me if what we're talking about here is having mutating methods return self rather than None. Chaining stuff is pretty, but having methods that mutate self and return self looks like a source of elusive bugs to me.
-tim Rudolph van der Merwe wrote: > This definitely gets my vote as well (for what it's worth). > > R. > > On 8/29/06, Fernando Perez <[EMAIL PROTECTED]> wrote: > >> +1 for more 'return self' at the end of methods which currently don't >> return anything (well, we get the default None), as long as it's >> sensible. I really like this 'message chaining' style of programming, >> and it annoys me that much of the python stdlib gratuitously prevents >> it by NOT returning self in places where it would be a perfectly >> sensible thing to do. >> >> I find it much cleaner to write >> >> x = foo.bar().baz(param).frob() >> >> than >> >> foo.bar() >> foo.baz(param) >> x = foo.frob() >> >> but perhaps others disagree. >> >> Cheers, >> >> f >> > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion