[MERGE] Add current-directory information to osutils.walkdirs
Martin Pool
mbp at canonical.com
Mon Jul 31 02:52:40 BST 2006
On 31 Jul 2006, Robert Collins <robertc at robertcollins.net> wrote:
> This adds the directory path-from-prefix and path-from-top information
> to the output of osutils.walkdirs, which makes it easier to use - less
> bookkeeping data is needed.
Adding them seems useful though I'd second John's comments about
a better explanation.
I really think there is value to the maxim of not changing interfaces
but rather removing the old one and adding a new one. In this case if
you change the return type then rename the function too. Then rather
than an obscure breakage because some code didn't expect this value,
you'll get a clear error that it's not there anymore. This case is
particularly important in Python where mismatched return types may not
be easily detected.
(Yes, complete tests will catch this, but even then I'd rather have an
obvious failure than an obscure one.)
For example you could call it walk_dirs to make it more pep8...
--
Martin
More information about the bazaar
mailing list