t:
print exc_info()
--
still yields exceptions.TypeError.
Now, back to original question then, do you think it'd be
beneficial to have some sort of exception ignoring or expecting
statement ?
Sincerely,
Dmitry Dvoinikov
http://www.targeted.org/
--- Original message follows ---
Error:
c().foo()
and still can be implemented under PEP 343, that's what
I meant under "more flexible".
Sincerely,
Dmitry Dvoinikov
http://www.targeted.org/
--- Original message follows ---
>> I suspect that you wanted either:
>>try:
>>c().foo(
se:
assert False, "c.foo() should have thrown TypeError"
and so if foo throws anything but TypeError I get traceback,
otherwise it's an assertion error and is reported as such.
This is probably just one of the many possible wording of the
same thing though.
Sincerely,
Dmitry Dvoin
> If you're trying to write tests, perhaps a better use-case would be
> something like:
> with required_exception(SomeError):
> do something that should cause SomeError
Yes, you are right, that'd be a better and more flexible way,
thank you.
Sincerely,
h could be written as
ignore TypeError: c().foo()
Sincerely,
Dmitry Dvoinikov
http://www.targeted.org/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/opti
is still a bit unpleasant:
---
do:
body
while Cond:
# no else here
-------
Sincerely,
Dmitry Dvoinikov
http://www.targeted.org/
--- Original message follows ---
> [BJörn Lindqvist]
>> I would like to have do-while's like this:
>>
>>