On 12/25/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:

Jeremy Dunck wrote:

> NOT_GIVEN="(*piuhuI&*uyobJH!ikuoi1p9e;mks c0p[p"
>
> def reduce_(f,s,i=NOT_GIVEN):
>    it=iter(s)
>    if i == NOT_GIVEN:

hmm.  if you post code like that often enough, we may have to revoke
your python coder's license ;-)

Ouch!  I'm gonna go cry behind the tree now.
..
    NOT_GIVEN = object() # sentinel
..
        if i is NOT_GIVEN:
..

I'll have to dig through django source, but I'm pretty sure I've seen
sentinels implemented with the "oh, this string'll never be valid
input" strategy.  I'll make a patch for those.

Thanks for the dopeslap.  :)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to