On Tue, 10 Sep 2002 12:45:35 -0700 (PDT), Ian Maurer wrote:
>
>--- Tim Roberts <[EMAIL PROTECTED]> wrote:
>> Ian Maurer <[EMAIL PROTECTED]> wrote:
>> >class Waldo:
>> >    __shared_state = {                           #
>> >shared state: all instances share the same data
>> >                        'dbPool':             None,
>> >...
>> 
>> As a stylistic note: you should not generally use
>> double underscores as a lead-
>> in for your own variable names.  Those are reserved
>> for Python itself.
>> 
>
>I always thought double underscores was a method for
>making attributes and methods 'private' (actually
>'mangled' would be the right word since there isn't
>the 'security' that C++ provides).
>
>Can someone confirm either theory for us?

*One* underscore marks an attribute or method as private.  Double underscored 
names are reserved for Python.


--
- Tim Roberts, [EMAIL PROTECTED]
  Providenza & Boekelheide, Inc.




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to