[Tutor] When you think to setup the __class__ of a module object to a subclass of ModuleType
Steven D'Aprano
steve at pearwood.info
Thu Apr 25 03:51:43 EDT 2019
On Thu, Apr 25, 2019 at 11:30:28AM +0530, Arup Rakshit wrote:
> On 25/04/19 3:52 AM, Alan Gauld via Tutor wrote:
> >On 24/04/2019 12:22, Arup Rakshit wrote:
> >>In the simple code like what are the advantages we get from?
> >I'm not really sure what you are asking about?
>
> Ok. My question is that when people add such a class to the module? What
> is the goal/intention they met by setting such __class__ attribute of a
> module. The documentation I am reading just shown this technique but
> didn't dig into this. They didn't explain why/when should we use this
> technique, but the how.
Can to share which documentation you are reading? I've been using Python
since version 1.5, and I've never heard of this technique.
Thanks.
--
Steven
More information about the Tutor
mailing list