Re: A "sub" question...



On 12/30/05, Robert Hicks <sigzero@xxxxxxxxx> wrote:
> Note the leading underscore in the sub name. What does that mean? Is that
> like making it "private"?

Yes. But as a convention: that means: you sensible reader, don't you
try to rely on this function outside of this immediate realm of code.
But you can cheat as you like - at your risk.
.



Relevant Pages

  • Re: Why less emphasis on private data?
    ... I've often found wrapping private data useful to ... done extensive maintenance programming on code written by others. ... def fget: ... JavaScript has the convention that newly created ...
    (comp.lang.python)
  • Re: Naming Conventions dot net/csharp
    ... (such as control, private members etc). ... Or a private class variable is created so ... > private variables and methods you can use your own convention. ... > or your company standardises on a naming convention for private stuff, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Does Python really follow its philosophy of "Readability counts"?
    ... I noticed a funny side effect of my 'namespaces' module (needs a LOT of ... """dummy class A, with one 'private' attribute x, and one ... sometimes desirable to break the convention. ... and pylint should be able to pick them up. ...
    (comp.lang.python)
  • Re: About classes and OOP in Python
    ... Yes, you can bypass this if you really want to, but then ... you can bypass private in C++ too. ... Just like ALL_CAPS names is a convention ... the __name_mangling mechanism is meant to protect some attributes to be ...
    (comp.lang.python)
  • Re: Will python never intend to support private, protected and public?
    ... > That's a pretty restrictive convention to follow. ... I might want an error dialog to be a private variable ... if you want to NOT leak some ... > File scope isn't good enough for python. ...
    (comp.lang.python)