Mercurial > repos > shellac > guppy_basecaller
diff env/lib/python3.7/site-packages/galaxy/util/bunch.py @ 5:9b1c78e6ba9c draft default tip
"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author | shellac |
---|---|
date | Mon, 01 Jun 2020 08:59:25 -0400 |
parents | 79f47841a781 |
children |
line wrap: on
line diff
--- a/env/lib/python3.7/site-packages/galaxy/util/bunch.py Thu May 14 16:47:39 2020 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -class Bunch(object): - """ - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308 - - Often we want to just collect a bunch of stuff together, naming each item of - the bunch; a dictionary's OK for that, but a small do-nothing class is even handier, and prettier to use. - """ - - def __init__(self, **kwds): - self.__dict__.update(kwds) - - def dict(self): - return self.__dict__ - - def get(self, key, default=None): - return self.__dict__.get(key, default) - - def __iter__(self): - return iter(self.__dict__) - - def items(self): - return self.__dict__.items() - - def keys(self): - return self.__dict__.keys() - - def values(self): - return self.__dict__.values() - - def __str__(self): - return '%s' % self.__dict__ - - def __bool__(self): - return bool(self.__dict__) - __nonzero__ = __bool__ - - def __setitem__(self, k, v): - self.__dict__.__setitem__(k, v) - - def __contains__(self, item): - return item in self.__dict__