What is the naming convention for accessor of a 'private' variable?

Discussion in 'Python' started by Peng Yu, Nov 19, 2009.

  1. Peng Yu

    Peng Yu Guest

    http://www.python.org/dev/peps/pep-0008/

    The above webpage states the following naming convention. Such a
    variable can be an internal variable in a class. I'm wondering what is
    the naming convention for the method that access such variable.

    - _single_leading_underscore: weak "internal use" indicator. E.g. "from M
    import *" does not import objects whose name starts with an underscore.
    Peng Yu, Nov 19, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Unpredictable

    Variable naming convention

    Unpredictable, Jan 3, 2006, in forum: Java
    Replies:
    4
    Views:
    534
    Roedy Green
    Jan 3, 2006
  2. Generic Usenet Account

    Naming convention for accessor methods (get/set)

    Generic Usenet Account, Sep 19, 2003, in forum: C++
    Replies:
    24
    Views:
    2,791
    Glen Low
    Oct 6, 2003
  3. Peng Yu
    Replies:
    3
    Views:
    1,066
    Simon Forman
    Sep 21, 2009
  4. Chris Rebert
    Replies:
    2
    Views:
    350
    Gregory Ewing
    Nov 21, 2009
  5. Peng Yu
    Replies:
    1
    Views:
    331
    Lie Ryan
    Nov 22, 2009
Loading...

Share This Page