def archive(request, entry_type=None, page_number=1):
    """Display an archive of posts.
    """
    num = getattr(settings, 'MUMBLR_NUM_ENTRIES_PER_PAGE', 10)
    entry_types = [e.type for e in EntryType._types.values()]
    entry_class = EntryType
    type = "All"

    if entry_type and [e.lower() for e in entry_types] in entry_type:
        entry_class = EntryType._types[entry_type.lower()]
        type = entry_class.type

    paginator = Paginator(entry_class.live_entries(), num)
    try:
        entries = paginator.page(page_number)
    except (EmptyPage, InvalidPage):
        entries = paginator.page(paginator.num_pages)

    context = {
        'entry_types': entry_types,
        'entries': entries,
        'num_entries': entry_class.live_entries().count(),
        'entry_type': type,
    }
    return render_to_response(_lookup_template('archive'), context,
                              context_instance=RequestContext(request))
dataset/ETHPy150Open hmarr/django-mumblr/mumblr/views/core.py/archive/swapped operands of `in`