MCPcopy Create free account
hub / github.com/s3tools/s3cmd / keys

Method keys

S3/SortedDict.py:48–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46 self.ignore_case = ignore_case
47
48 def keys(self):
49 # TODO fix
50 # Probably not anymore memory efficient on python2
51 # as now 2 copies of keys to sort them.
52 keys = dict.keys(self)
53 if self.ignore_case:
54 # Translation map
55 xlat_map = BidirMap()
56 for key in keys:
57 xlat_map[key.lower()] = key
58 # Lowercase keys
59 lc_keys = sorted(xlat_map.keys())
60 return [xlat_map[k] for k in lc_keys]
61 else:
62 keys = sorted(keys)
63 return keys
64
65 def __iter__(self):
66 return SortedDictIterator(self, self.keys())

Callers 6

__iter__Method · 0.95
__reversed__Method · 0.95
__getitem__Method · 0.95
sign_request_v2Function · 0.95
sign_request_v4Function · 0.95
SortedDict.pyFile · 0.45

Calls 2

keysMethod · 0.95
BidirMapClass · 0.90

Tested by

no test coverage detected