[Python-Dev] Breaking undocumented API (original) (raw)
Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Nov 11 19:01:10 CET 2010
- Previous message: [Python-Dev] Breaking undocumented API
- Next message: [Python-Dev] Breaking undocumented API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2010/11/11 Michael Foord <fuzzyman at voidspace.org.uk>: ..
You mean runtime automation, e.g. creating all on the fly omitting underscored names?
Writing code to generate a all that duplicates the default behaviour seems redundant to me.
FWIW, I like having all at the top of the module. It feels like a table of contents at the start of a chapter. In some cases it may also serve as an optimization when len(all) is much smaller than len(dict). I also don't like _ prefix to become an exclusive means to express privateness.
I think the current definition of "public names" is a good one and just needs to be made more visible in the docs. If the module defines all, that should be the ultimate answer to what is public in that module. (Users should learn to use help(module) instead of dir(module) for API discovery.) If all is not defined in the module, I think it is good to introduce it after a careful review of what it should contain. And all should never contain names that start with _.
- Previous message: [Python-Dev] Breaking undocumented API
- Next message: [Python-Dev] Breaking undocumented API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]