Is it bad practise to write __all__ like that
Ian Kelly
ian.g.kelly at gmail.com
Thu Jul 28 14:01:19 EDT 2011
On Thu, Jul 28, 2011 at 7:22 AM, mark ferguson <markferg at gmail.com> wrote:
> I've not really got the hang of decorators yet, so I was wondering why one
> might use your approach rather than just using Karim's original method?
The advantage of Thomas's decorator here is that it lets you place the
denotation of whether a function is exported alongside its definition,
whereas simply declaring the __all__ list forces you to separate them.
It also avoids the problem of possibly mistyping the function's name
in the list.
More information about the Python-list
mailing list