Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit4.readnews.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Nice solution wanted: Hide internal interfaces Date: Mon, 29 Oct 2012 18:00:58 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 22 Message-ID: References: NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1351533658 29143 64.122.56.22 (29 Oct 2012 18:00:58 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 29 Oct 2012 18:00:58 +0000 (UTC) User-Agent: slrn/pre1.0.0-18 (Linux) Xref: csiph.com comp.lang.python:32411 On 2012-10-29, Johannes Bauer wrote: > On 29.10.2012 17:47, Chris Angelico wrote: > >> The usual convention for private methods is a leading underscore on the name: > > Yup, that's what I'm using. > >> It's only a convention, though; it doesn't make it "hard" to call >> them, it just sends the message "this is private, I don't promise that >> it'll be stable across versions". > > Yes, I know. But it's good enough. I don't want to restrict the use > under all circumstances, just make it clear to the user what she is > supposed to use and what not. The single underscore indicates that the user is not to use the method. -- Grant Edwards grant.b.edwards Yow! I am covered with at pure vegetable oil and I am gmail.com writing a best seller!