# `CaselessList`

digraph inheritancea53c5d8244 { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "CaselessList" [URL="#taurus.core.util.containers.CaselessList",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="A case insensitive lists that has some caseless methods. Only allows"]; }

class CaselessList(inlist=[])

  A case insensitive lists that has some caseless methods. Only allows strings as list members. Most methods that would normally return a list, return a CaselessList. (Except list() and lowercopy()) Sequence Methods implemented are : __contains__, remove, count, index, append, extend, insert, __getitem__, __setitem__, __getslice__, __setslice__ __add__, __radd__, __iadd__, __mul__, __rmul__ Plus Extra methods: findentry, copy , lowercopy, list Inherited methods : __imul__, __len__, __iter__, pop, reverse, sort

  Import from `taurus.core.util.containers` as:

      from taurus.core.util.containers import CaselessList

  append(item)

    Adds an item to the list and checks it’s a string.

  copy()

    Return a CaselessList copy of self.

  count(item)

    Counts references to ‘item’ in a caseless manner. If item is not a string it will always return 0.

  extend(item)

    Extend the list with another list. Each member of the list must be a string.

  findentry(item)

    A caseless way of checking if an item is in the list or not. It returns None or the entry.

  index(item, minindex=0, maxindex=None)

    Provide an index of first occurence of item in the list. (or raise a ValueError if item not present) If item is not a string, will raise a TypeError. minindex and maxindex are also optional arguments s.index(x[, i[, j]]) return smallest k such that s[k] == x and i <= k < j

  insert(i, x)

    s.insert(i, x) same as s[i:i] = [x] Raises TypeError if x isn’t a string.

  list()

    Return a normal list version of self.

  lowercopy()

    Return a lowercase (list) copy of self.

  remove(item)

    Remove the first occurence of an item, the caseless way.