python __main__ is similar to java main()

Peter Hansen peter at engcorp.com
Wed Jun 19 19:35:38 EDT 2002


David Nunes wrote:
> 
> class Lancamento:
>     ReqID = 0
> 
>     #PDNConsulta
> 
>     def ___init__(self):
>         #inicializacao do PDNConsulta
>         pass
> 

Not answering the immediate question, but pointing out a bug:

  def __init__(self):

is the correct spelling.  If it was just a typo, you're okay,
but if you actually cut-and-pasted the text you've got a latent
problem in your code with the triple leading underscore.

-Peter



More information about the Python-list mailing list