Re: init inside def

2010-10-25 Thread bruno.desthuilli...@gmail.com
On 25 oct, 12:05, targetsmart wrote: > Hi, > today I just came across a python code snippet where __init__ was > defined inside a function.. > I am not able to understand the reason why > > The code snippet was similar like > > def func1(a,b): >   def __init__(): >     func2(a,b) >   def func2(a,b

init inside def

2010-10-25 Thread targetsmart
Hi, today I just came across a python code snippet where __init__ was defined inside a function.. I am not able to understand the reason why The code snippet was similar like def func1(a,b): def __init__(): func2(a,b) def func2(a,b): if a == b: return True else: return