Dennis Lee Bieber wrote: > tOn Mon, 08 May 2006 14:04:34 GMT, John Salerno > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> I tried the underscore method, but I was still able to call it as a >> regular instance method in the interpreter. Is that what's supposed to >> happen? > > Single underscores are a convention/signal to the programmer that > "this method/attribute" is considered "private" and should only be used > by other methods within the class that defined it. The language does no > enforcement of usage. For example:
I see. But isn't there something about a single leading underscore that doesn't import when you use from X import *? Or am I thinking of something else? Is that also the double underscore? -- http://mail.python.org/mailman/listinfo/python-list