On 2015-09-30 01:08, Dougal Matthews wrote: > Hi, > > What is the standard practice for defining public API's for OpenStack > libraries? As I am working on refactoring and updating tripleo-common I have > to grep through the projects I know that use it to make sure I don't break > anything. > > Personally I would choose to have a policy of "If it is documented, it is > public" because that is very clear and it still allows us to do internal > refactoring. > > Otherwise we could use __all__ to define what is public in each file, or > assume everything that doesn't start with an underscore is public. The last is the accepted Python convention: https://docs.python.org/2/tutorial/classes.html#private-variables-and-class-local-references and is in common use in other OpenStack libraries. It also integrates properly with things like automatic api docs from sphinx. I'd be -1 on pretty much any other approach. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150930/5565e847/attachment.html>