@tornado.gen.coroutine
    def getprop(self, ctx, loctx, key):
        wid = loctx.wid
        iid = loctx.iid
        locid = self.locid
        app = ctx.app
        dependencies = ctx.dependencies
        
        if iid is not None:
            res = yield app.propcache.get(('instanceprop', iid, locid, key),
                                          dependencies=dependencies)
            if res:
                return res.val
    
        if True:
            res = yield app.propcache.get(('worldprop', wid, locid, key),
                                          dependencies=dependencies)
            if res:
                return res.val

        if iid is not None:
            res = yield app.propcache.get(('instanceprop', iid, None, key),
                                          dependencies=dependencies)
            if res:
                return res.val
    
        if True:
            res = yield app.propcache.get(('worldprop', wid, None, key),
                                          dependencies=dependencies)
            if res:
                return res.val

        raise AttributeError('Property "%s" is not found' % (key,))
Creates an OptionParser with generic usage and description strings.
dataset/ETHPy150Open erkyrath/tworld/lib/two/execute.py/LocationProxy.getprop--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appcfg.py/AppCfgApp._GetOptionParser