En Tue, 22 Jun 2010 23:33:55 -0300, Zac Burns escribió:
In the threading module there are several code bits following this
convention:
###
def Class(*args, **kwargs):
return _Class(*args, **kwargs)
class _Class(...
###
This is true for Event, RLock, and others.
Why do this? It seems to
This looks like a public class exposing an implementation private class.Jun 22, 2010 10:39:05 PM, zac...@gmail.com wrote:In the threading module there are several code bits following this convention:###def Class(*args, **kwargs): return _Class(*args, **kwargs)class _Class(...###This is true for
In the threading module there are several code bits following this
convention:
###
def Class(*args, **kwargs):
return _Class(*args, **kwargs)
class _Class(...
###
This is true for Event, RLock, and others.
Why do this? It seems to violate the rule of least astonishment
(isinstance(Event(),