/usr/share/pyshared/sprox/util.py is in python-sprox 0.6.4-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | """
util Module
this contains the class which allows dbsprockets to interface with sqlalchemy.
Classes:
Name Description
MultiDict A class that allows dicts with multiple keys of the same value
Exceptions:
None
Functions:
None
Copyright (c) 2007 Christopher Perkins
Original Version by Christopher Perkins 2007
Released under MIT license.
"""
from copy import deepcopy, copy
class MultiDict(dict):
def __setitem__(self, key, value):
self.setdefault(key, []).append(value)
def iteritems(self):
for key in self:
values = dict.__getitem__(self, key)
for value in values:
yield (key, value)
|