Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

Why are these files names started with underscore?

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


gmspro at yahoo

Jun 24, 2012, 1:42 AM

Post #1 of 3 (138 views)
Permalink
Why are these files names started with underscore?

Hi,

I see there are some files here started with underscore(_) , is there any convention of something for it?

http://hg.python.org/cpython/file/3b7230997425/Modules

_bisectmodule.c
_bz2module.c
_codecsmodule.c
_collectionsmodule.c
_cryptmodule.c
_csv.c
_curses_panel.c
_cursesmodule.c
_datetimemodule.c
_dbmmodule.c
_elementtree.c
_freeze_importlib.c
_functoolsmodule.c
_gdbmmodule.c
_gestalt.c
_hashopenssl.c
_heapqmodule.c
_json.c
_localemodule.c
_lsprof.c
_lzmamodule.c
_math.c
_math.h
_pickle.c
_posixsubprocess.c
_randommodule.c
_scproxy.c
_sre.c
_ssl.c
_ssl_data.h
_struct.c
_testbuffer.c
_testcapimodule.c
_testembed.c
_threadmodule.c
_tkinter.c
_weakref.c
_winapi.c

Is there any convention or something?

Any answer will be highly appreciated.

Thanks.


stefan_ml at behnel

Jun 24, 2012, 1:55 AM

Post #2 of 3 (130 views)
Permalink
Re: Why are these files names started with underscore? [In reply to]

gmspro, 24.06.2012 10:42:
> I see there are some files here started with underscore(_) , is there any convention of something for it?
>
> http://hg.python.org/cpython/file/3b7230997425/Modules
>
> _bisectmodule.c
> [...]
> _winapi.c
>
> Is there any convention or something?

Yes. Please read the CPython developer guide (click on "core development"
on the Python front page).

Stefan

--
http://mail.python.org/mailman/listinfo/python-list


rosuav at gmail

Jun 24, 2012, 1:55 AM

Post #3 of 3 (127 views)
Permalink
Re: Why are these files names started with underscore? [In reply to]

On Sun, Jun 24, 2012 at 6:42 PM, gmspro <gmspro [at] yahoo> wrote:
>
> Hi,
>
> I see there are some files here started with underscore(_) , is there any
> convention of something for it?
>
> Is there any convention or something?

They're private implementations of public APIs. You can ignore them as
implementation details.

For using Python, I strongly recommend reading the docs, not the
source. Among other things, that'll help you avoid the trap of writing
to a CPython implementation detail.

ChrisA
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.