On Fri, Jul 17, 2009 at 12:04 PM, Amit Sethi<[email protected]> wrote:
> now I have created a class with some functions defined in it but the > thing is that they are named in a completely different manner?????(or > so I think) > > <__main__.SmPriceWindow instance at 0x9dd448c> > ['_SmPriceWindow__add_columns', '_SmPriceWindow__create_model', > '_SmPriceWindow__review_button_click', '_SmPriceWindow__show_all', > '_SmPriceWindow__url_button_click', '__doc__', '__init__', > '__module__', 'model', 'tree', 'window'] > Traceback (most recent call last): > File "smnotebook3.py", line 135, in price_button_pressed > sw.__show_all() > AttributeError: SmPriceWindow instance has no attribute '__show_all' > > I have refered to these functions(__add_columns ,__create_model etc > ... as self.__add_columns as would be expected in the class itself ) Names beginning with __ are 'mangled' to make them sort of secret. This is a feature: http://docs.python.org/reference/expressions.html#index-889 Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
