[Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/ (original) (raw)
Hrvoje Niksic hrvoje.niksic at avl.com
Wed Nov 3 13:38:58 CET 2010
- Previous message: [Python-Dev] On breaking modules into packages
- Next message: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 11/03/2010 01:47 AM, Ben Finney wrote:
If someone wants to depend on some undocumented detail of the directory layout it's their problem (like people depending on bytecode and other stuff). I would say that names without a single leading underscore are part of the public API, whether documented or not.
I understand this reasoning, but I'd like to offer counter-examples. For instance, would you say that glob.glob0 and glob.glob1 are public API? They're undocumented, they're not in all, but they don't have a leading underscore either, and source comments call them "helper functions." I'm sure there is a lot of other examples like that, both in the standard library and in python packages out there.
Other than the existing practice, there is the matter of esthetics. Accepting underscore-less identifiers as automatically public leads to a proliferation of identifiers with leading underscores, which many people (myself included) plainly don't like.
- Previous message: [Python-Dev] On breaking modules into packages
- Next message: [Python-Dev] On breaking modules into packages Was: [issue10199] Move Demo/turtle under Lib/
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]