public/private/stable/unstable

Robert Collins robertc at robertcollins.net
Wed Aug 27 01:11:29 BST 2008


On Tue, 2008-08-26 at 19:52 -0400, Aaron Bentley wrote:
> I would like people to be able to tell, at a glance, when a method is
> completely safe to use.  I think requiring reading the docstring of
> every non _ method would be burdensome.

I think 'safe to use' is simply too complex to encapsulate in the method
name. More below.

> How about:
> _ -> unsupported-AND-private unless the docstring says otherwise
> no _ -> supported and public.
> 
> So you'd signal unsupported-and-public using a _ with a docstring.

I'd be happy with this.

Won't this will force every method on internal objects to be _ prefixed
though? Because the object is internal, but people glancing at the code
can't tell that because the object is bound to an arbitrary name, so
they see methods being called...

-Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080827/6b4996d7/attachment.pgp 


More information about the bazaar mailing list