473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Why does the _winreg module start with an underscore

Does it signify something? Just curious.
Louis
May 19 '06 #1
3 1715
3c273 wrote:
Does it signify something? Just curious.


Dear quasar,

Typically an identifier starting with an underscore signifies something
that is not intended to be exposed as part of a public API. In other
words, it's an implementation detail in whatever you're using and as
such you probably shouldn't use it or rely on it, unless you know the
internal details very well. An identifier starting with _two_
underscores is automatically mangled in a way that makes it more
difficult (but not impossible) for external clients to accidentally use
them.

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
I wonder if heaven got a ghetto
-- Tupac Shakur
May 19 '06 #2
3c273 wrote:
Does it signify something? Just curious.


from the module documentation:

This module exposes a very low-level interface to the Windows
registry; it is expected that in the future a new winreg module
will be created offering a higher-level interface to the registry
API.

</F>

May 19 '06 #3

"Erik Max Francis" <ma*@alcyone.com> wrote in message
news:K5******************************@speakeasy.ne t...
3c273 wrote:
Does it signify something? Just curious.


Dear quasar,

Typically an identifier starting with an underscore signifies something
that is not intended to be exposed as part of a public API. In other
words, it's an implementation detail in whatever you're using and as
such you probably shouldn't use it or rely on it, unless you know the
internal details very well. An identifier starting with _two_
underscores is automatically mangled in a way that makes it more
difficult (but not impossible) for external clients to accidentally use
them.

Thanks for the explanation. (Fellow astronomer?)
Louis
May 19 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Sellers | last post by:
newbee question...I haven't worked on Python since Python 1.5.2 cygwin setup installs Python 2.3.2-1 on Windows XP however: $ python Python 2.3.2 (#1, Oct 9 2003, 12:03:29)
1
by: Erick Bodine | last post by:
I am trying to set a new environment variable on a W2k machine with only partial success. The name("SSID") and value("ASIM") show up correctly in the registry and when I go to "System...
2
by: Raymond Tinsel | last post by:
Hello all, I know this must be a newbie question, but I haven't found the solution in the tutorials I have read. For a dSPACE/Controldesk application I am defining several of my own modules....
4
by: Brad Tilley | last post by:
The below function fails with this error: ValueError: Could not convert the data to the specified type. The problem appears to be the v variable. When I make v an int, I get: WindowsError: ...
75
by: Beni | last post by:
I have been programming in C for about a year now. It sounds silly, but I never took the time to question why a C(or C++ or Java) program execution begins only at the main(). Is it a convention or...
21
by: Cottonwood | last post by:
I want to call a C module from a Fortran program. Whatever I tried - the linker could not find the C module. I know about the leading underscore and switched even that off. I abstracted everything...
2
by: RodneyWMcBride | last post by:
Reply with quote Edit/Delete this post Delete this post Post _winreg.SaveKey question Does anyone know where I might find some sample code of using the saveKey function? I am getting an error 5...
2
by: black_13 | last post by:
I have included a small script the reproduces the error I am having in larger script. The line 'hkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,name)' seems to be causing the error but im not...
162
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.