PEP 340 describes the block statement translation as:

        itr = EXPR1
        val = arg = None
        ret = False
        while True:
            try:
                VAR1 = next(itr, arg)
            except StopIteration:
                if ret:
                    return val
                if val is not None:
                    raise val
                break
            try:
                val = arg = None
                ret = False
                BLOCK1
            except Exception, val:
                arg = StopIteration()

It uses a variable "ret" that is always False.  If it does manage to take on
a True value, a return statement is executed.  How does ret become True?
What's meaning of return in this context?  Something seems amiss.

Skip
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to