private variables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • belinda thom

    #1

    private variables

    Hello,

    In what version of python were private variables added?

    Thanks,

    --b

  • Ravi Teja

    #2
    Re: private variables


    belinda thom wrote:
    Hello,
    >
    In what version of python were private variables added?
    >
    Thanks,
    >
    --b
    Short answer - 1.5 (or - so long ago that it doesn't matter anymore)
    Long answer - There are no true private variables in Python. Just
    private variables names by convention.

    See Python docs for a detailed explanation.

    Ravi Teja.

    Comment

    • Bruno Desthuilliers

      #3
      Re: private variables

      belinda thom a écrit :
      Hello,
      >
      In what version of python were private variables added?
      Which private variables ?

      Comment

      • belinda thom

        #4
        Re: private variables


        On Jan 9, 2007, at 12:20 AM, Bruno Desthuilliers wrote:
        belinda thom a écrit :
        >Hello,
        >>
        >In what version of python were private variables added?
        >
        Which private variables ?
        Haha.

        The ones that are provided for convenience (via name mangling) that
        aren't really private if you wish to violate convention.

        --b

        Comment

        Working...