RE: namedtuple suggestions

2008-06-13 Thread Jason R. Coombs
(see lib/urlparse for a prime example of extending the namedtuple class). Regards, Jason -Original Message- From: Calvin Spealman [mailto:[EMAIL PROTECTED] Sent: Friday, 13 June, 2008 12:17 To: Jason R. Coombs Cc: python-list@python.org Subject: Re: namedtuple suggestions On Jun 13, 2008

Re: namedtuple suggestions

2008-06-13 Thread Calvin Spealman
On Jun 13, 2008, at 11:17 AM, Jason R. Coombs wrote: I see a new function in (python 2.6) lib/collections called namedtuple. This is a great function. I can see many places in my code where this will be immensely useful. I have a couple of suggestions. My first suggestion is to use self.__cl

namedtuple suggestions

2008-06-13 Thread Jason R. Coombs
I see a new function in (python 2.6) lib/collections called namedtuple. This is a great function. I can see many places in my code where this will be immensely useful. I have a couple of suggestions. My first suggestion is to use self.__class__.__name__ instead of the hard-coded typename in __r