ce, though if there is one and I didn't find it I would be
very happy to be proven wrong. In any case, I would appreciate advice
from the experts regarding what's available and what it tests.
thank you,
Niko Matsakis
___
Python-Dev mai
> I saw them. Your brain must be wired very differently
> to mine, because I find loops with a continue in them
> harder to follow than ones without -- exactly the
> opposite of what you seem to prefer.
Delurking for no particular reason:
For what it's worth, I also favor the continue syntax Heik
> Boy am I wanting RAII from C++ for automatic freeing when scope is
> left. Maybe we need to come up with a similar thing, like all memory
> that should be freed once a scope is left must use some special struct
> that stores references to all created memory locally and then a free
> call must be
> As Neal pointed out, it's tricky to write code for the AST parser
> and compiler
> without accidentally letting memory leak when the parser or
> compiler runs into
> a problem and has to bail out on whatever it was doing. Thomas's
> patch got to
> v5 (based on Neal's review comments) with m
>
> txn = new_transaction()
> try:
> txn.begin()
> rtn = do_work()
> finally:
> if exception_occurred():
> txn.abort()
> else:
> txn.commit()
> return rtn
>
Couldn't you just do:
txn = new_transaction ()
try:
complete = 0
txn.begin ()
> As for the rest, I'm not as sure and it would be helpful to get
> thoughts
> from others on this one. My sense is that blocking the clause from
> appearing in the middle is treating the symptom and not the disease.
+1
It would be better to prohibit bare except entirely (well, presumably
at