risk, why not use
> the try...except version and avoid it completely?
>
Ok.
Thanks for your explanations.
--
Manuel Pégourié-Gonnard - http://people.math.jussieu.fr/~mpg/
--
http://mail.python.org/mailman/listinfo/python-list
Günther Dietrich scripsit :
> Somewhere I read a text regarding 'try:' versus 'if'. If you take the
> probabitility into consideration, how many times the test will fail or
> succeed, there are two possibilities: [...]
Ok, thanks for the details!
--
M
ering
EAFP over LBYL here?
Thanks in advance for your comments.
--
Manuel Pégourié-Gonnard - http://people.math.jussieu.fr/~mpg/
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten scripsit :
> Manuel Pégourié-Gonnard wrote:
>
>> Peter Otten scripsit :
>>
>>> __unittest = True
>>>
>> Hum, is it documented somewhere? I can't find it in the doc. Also, I'm
>> curious to know what kind of magic it's usi
his
>> frame-hiding behaviour to my own method?
>
> Move MyTestCase in a separate module and define a global variable
>
> __unittest = True
>
Hum, is it documented somewhere? I can't find it in the doc. Also, I'm
curious to know what kind of magic it's using.
soon as i != j, if r is
the resulting list of lists. (As opposed to having r[i][j] != r[i][k] for all i
and j != k.)
--
Manuel Pégourié-Gonnard - http://people.math.jussieu.fr/~mpg/
--
http://mail.python.org/mailman/listinfo/python-list
f __init__(self):
print("C init, calling C's parent init?")
super().__init__() # sic
class NotParentOfC:
def __init__(self):
print("NotParentOfC init")
class Sub(C, NotParentOfC):
pass
spam = Sub()
When Sub is instantiated, the line marked "sic" calls
NotParentOfC.__init, not object.__init__ (as if would if C was
instantiated).
--
Manuel Pégourié-Gonnard - http://people.math.jussieu.fr/~mpg/
--
http://mail.python.org/mailman/listinfo/python-list