Noam Raphael wrote: > I hope that my (hopefully) better explanation made the use case more > compelling, but I want to add two points in favour of an empty tuple:
I guess I'm really only -0 on the idea of x[] invoking x.__getitem__(), and allowing the class to decide whether or not to define a default value for the subscript. I wouldn't implement it myself, but I wouldn't object strenuously if Guido decided it was OK :) For your specific use cases, though, I'd be inclined to tweak the API a bit, and switch to using attributes for the single-valued data: tax_rates.income_tax = 0.18 Although the income tax rate should actually depend on the current financial year, since it can change over time as the government increases taxes ;) > Why? Mental exercise is a good way to keep you mental ;) Hehe :) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ 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