On Mon, Jan 14, 2013 at 1:38 PM, Greg Ewing
<greg.ewing@canterbury.ac.nz> wrote:
Steven D'Aprano wrote:
Rather than a flag, I suggest a version number:
glob.glob(pattern, version=1) # current behaviour, as of 3.3
glob.glob(pattern, version=2) # adds ** recursion in Python 3.4
Yuck, then the reader has to know what features are
enabled by which version numbers -- not something that's
easy to keep in one's head.
And if you write glob.glob(..., foofeature=True) it will automatically raise an exception if you use it in a version that doesn't support the feature rather than silently ignoring the error.
--- Bruce