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=[])[source]
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
- count(item)[source]
Counts references to ‘item’ in a caseless manner. If item is not a string it will always return 0.
- findentry(item)[source]
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)[source]
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