Protection levels in Python

Discussion in 'Python' started by Kay Schluehr, Jul 27, 2006.

  1. Kay Schluehr

    Kay Schluehr Guest

    People often ask for making attributes "private" in the sense of
    restricting access as in Java or C++. I've created a recipe for
    attribute protection where all attributes are basically protected in
    the C++ sense of being visible in the class and in subclasses and where
    "public" attributes have to be declared explicitely:

    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496920

    Regards,
    Kay
    Kay Schluehr, Jul 27, 2006
    #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. sunil
    Replies:
    1
    Views:
    954
  2. Edwin Kusters

    Re: Multiple levels of Session Persistence

    Edwin Kusters, Jul 14, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    460
    John Saunders
    Jul 22, 2003
  3. =?Utf-8?B?bXVzb3NkZXY=?=

    Protection levels after Conversion Wizard

    =?Utf-8?B?bXVzb3NkZXY=?=, Jan 8, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,443
    Steven Cheng[MSFT]
    Jan 9, 2006
  4. g
    Replies:
    69
    Views:
    2,151
    Oliver Wong
    Apr 25, 2006
  5. John Fouhy

    Emacs python mode indent levels

    John Fouhy, Jul 15, 2004, in forum: Python
    Replies:
    2
    Views:
    839
    John Lenton
    Jul 15, 2004
Loading...

Share This Page