On Thu, 27 Jan 2005 18:31:55 -0700, Fernando Perez <[EMAIL PROTECTED]> wrote: > However, I think it would perhaps be best to advertise any methods of Bunch as > strictly classmethods from day 1. Otherwise, you can have: > > b = Bunch() > b.update(otherdict) -> otherdict happens to have an 'update' key > > ... more code > > b.update(someotherdict) -> boom! update is not callable > > If all Bunch methods are officially presented always as classmethods, users > can > simply expect that all attributes of a bunch are meant to store data, without > any instance methods at all.
That sounds reasonable to me. I'll fix update to be a staticmethod. If people want other methods, I'll make sure they're staticmethods too.[1] Steve [1] In all the cases I can think of, staticmethod is sufficient -- the methods don't need to access any attributes of the Bunch class. If anyone has a good reason to make them classmethods instead, let me know... -- You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com