[Python-ideas] working on a PEP for the preview package (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Tue Jan 3 18:29:42 CET 2012


On Tue, 03 Jan 2012 16:27:35 +0000 Robert Kern <robert.kern at gmail.com> wrote:

On 1/3/12 2:57 PM, Matt Joiner wrote: > Just a suggestion: > > Golang uses an "exp" namespace, this would translate to a exp package > for grouping like modules in a similar way that xml, http and > concurrent are currently used. > http://golang.org/pkg/exp/ > > The name is unoffensive, and somewhat more palatable than preview, > which really isn't a protocol, or a bag for special interpreter > switches like future. > > Under this scheme, the currently proposed modules would be: > > exp.regex > exp.daemon > exp.ipaddr > > Rather than > > preview.regex > preview.daemon > preview.ipaddr

The nice thing about the dunders is that no one will make a module with a conflicting name. That's really the common factor behind all uses of dunders: reserving a name for Python's use. Whether something is a protocol or bag of switches doesn't really enter into it.

Plus, writing "from preview import regex" looks cooler than "from exp import regex".

Regards

Antoine.



More information about the Python-ideas mailing list