#2265: [patch] Field's choices can be "used" only once if its a generator or an
iterator.
----------------------------+-----------------------------------------------
 Reporter:  Alex Dedul      |        Owner:  adrian
     Type:  defect          |       Status:  new   
 Priority:  normal          |    Milestone:        
Component:  Core framework  |      Version:        
 Severity:  normal          |   Resolution:        
 Keywords:                  |  
----------------------------+-----------------------------------------------
Comment (by Alex Dedul):

 As for me i'm using generator to fetch choices list from DB on external
 host and advanges of lazy fetching should be seen quite well here.
 
 As for itertools.tee replacement self.choices = list(choices) is no go,
 list() fetches values from iterator right away. What we need from fix is:
 
 1. Cache values.
 2. Lazy fetching.
 
 itertools.tee does exactly that.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2265>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to