On Dec 25, 2:49 pm, Steven D'Aprano <steve +comp.lang.pyt...@pearwood.info> wrote: > But that's a separate issue from what is being discussed here. What we're > discussing here is the idea that a function should be able to delegate > work to private subroutines without the caller being aware of that fact.
I can't fathom any possible reason why this could be considered a good thing, especially in Python where the culture is, "We're all adults here". By the same logic, it would be a good idea to prevent the user from accessing private members of a class, internal variables of a module, or importing an internal module directly. There is a convention in Python: internal objects are preceded by underscore. The fact that your internal function is marked this way in the traceback is more than enough information to the user that this is an internal function. Python is not, and never has been, about hiding internal details. It's about openness, and there's no reason a traceback should hide internal details any more than a class should--in fact hiding information in the traceback is far worse, because you're suppressing information that could be crucial for debugging. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list