Hi, 

I was thinking that it would be nice if we could use more power of 
namedtuples. For example get_field_by_name method returns 
tuple (field_object, model, direct, m2m) which requires user to dig up what 
each index means. I think this would increase code readability because 
data.model is more descriptive then data[1]. Nice thing is that it should 
be totally backward compatible with existing code as it's just a nicely 
named tuple ;). I don't really know if namedtuples have any serious 
drawbacks that would make this change a big problem so please point them 
out if you know any :). 
The get_field_by_name is probably not the only place where they could be 
used.  
What do you guys think? 


Regards, 
Adam Kaliński

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5f8af42c-91de-4a86-9158-dfbb249aab37%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to