Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(582)  |  Call(437)  |  Derive(13)  |  Import(132)
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.

e.g.
point = Bunch(datum=y, squared=y*y, coord=x)

and of course you can read/write the named attributes you just created,
add others, delete some of them, e.g.
    if point.squared > threshold:(more...)

src/g/i/ginga-2.0.20140425003909/ginga/misc/Settings.py   ginga(Download)
        self.preffile = preffile
 
        self.group = Bunch.Bunch()
 
    def addSettings(self, **kwdargs):
    def __init__(self, basefolder="/tmp", logger=None):
        self.folder = basefolder
        self.logger = logger
        self.settings = Bunch.Bunch(caseless=True)
 

src/g/i/ginga-HEAD/ginga/misc/Settings.py   ginga(Download)
        self.preffile = preffile
 
        self.group = Bunch.Bunch()
 
    def addSettings(self, **kwdargs):
    def __init__(self, basefolder="/tmp", logger=None):
        self.folder = basefolder
        self.logger = logger
        self.settings = Bunch.Bunch(caseless=True)