[Python-ideas] working on a PEP for the __preview__ package
techtonik at gmail.com
Wed Jan 4 11:45:52 CET 2012
On Wed, Jan 4, 2012 at 4:29 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On Wed, Jan 4, 2012 at 3:29 AM, Antoine Pitrou <solipsis at pitrou.net>
> > On Tue, 03 Jan 2012 16:27:35 +0000
> > Robert Kern <robert.kern at gmail.com> wrote:
> >> The nice thing about the dunders is that no one will make a module with
> >> conflicting name. That's really the common factor behind all uses of
> >> 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".
> Dunder names also alert people that something special is going on (in
> this case, it helps alert them to the fact that the modules in this
> namespace *will* be moved in the future).
I am afraid that dunders will become a standard thing in many Python
packages, because of everybody's natural desire to use latest features that
work right. That means that new people to Python will have to deal with
Python magic right from the start, which will make language more
complicated for them.
A correct way IMO would be to introduce a versioned exp27, exp271 packages:
1. It makes it explicitly clear when imported package version was
2. It allows to switch between multiple experimental package versions
3. It will provide future compatibility if a package released from `exp`
5. as a sum of 2+3 above - it provides a development process and extends
time to stabilize API with public testing and feedback before freezing the
package to die in stdlib
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas