Éric Araujo <mer...@netwok.org> added the comment:

Copied from msg143857:

> There are a lot of little internal routines in the standard library
> that aren't sufficiently fit to be exposed (perhaps a little too
> ad-hoc or special purpose, perhaps the API isn't sufficiently
> general, perhaps the routines rely on non-guaranteed aspects of the
> implementation).  For example, visiblename() is more heuristic than
> algorithmic -- right now, we can change that as needed (for instance,
> the recent updates to accommodate named tuples), but as soon as the
> method or function becomes public, its API freezes and it is hard for
> us to make changes.

I agree with your general point.  For this particular case, I’d be okay if you 
wanted to reject the request.  Users can filter the output of dir depending on 
their needs (_private names, __magic__ names, etc.).  For more useful code 
(that can cope with named tuples for example), I think generic functions would 
be a nice way to do this.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12917>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to