Atri Mahapatra wrote: > I have installed IDLE 3.5.1 and wrote the following to check if print is > working. When it runs, I do not see anything is printed: > > class Base: #{ > def __init__( self ): #{ > print("Hello, world: \n\n"); > > #} > > #} > > > if ( __name__ == " __main__"): #{ > root = Base(); > #} > > Can anyone please point out the reason?
Hard to tell. Either there slipped an extra space into the string literal in > if ( __name__ == " __main__"): #{ or the interpreter got really annoyed about you trying to write C/Java/PHP rather than proper Python... -- https://mail.python.org/mailman/listinfo/python-list