On Sep 23, 10:11 pm, Dave Angel <da...@ieee.org> wrote:
> This comes up periodically in this list, and the answer is always
> something like:  you can't get there from here.

Well, I'm both flexible and desperate, so this is a possible route
(perhaps near enough):


import sys

class Foo(object):

    def __rlshift__(self, name):
        try:
            raise Exception()
        except:
            locals = sys.exc_traceback.tb_frame.f_back.f_locals
            locals[name] = self

if __name__ == '__main__':
    foo = Foo()
    'a' << foo
    print(a)


andrew
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to