MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / __init__

Method __init__

cassandra/util.py:685–701  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

683 '''
684
685 def __init__(self, *args, **kwargs):
686 if len(args) > 1:
687 raise TypeError('expected at most 1 arguments, got %d' % len(args))
688
689 self._items = []
690 self._index = {}
691 if args:
692 e = args[0]
693 if callable(getattr(e, 'keys', None)):
694 for k in e.keys():
695 self._insert(k, e[k])
696 else:
697 for k, v in e:
698 self._insert(k, v)
699
700 for k, v in kwargs.items():
701 self._insert(k, v)
702
703 def _insert(self, key, value):
704 flat_key = self._serialize_key(key)

Callers

nothing calls this directly

Calls 3

_insertMethod · 0.95
keysMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected