Re: __init__ patterns

2018-08-30 Thread Terry Reedy
On 8/30/2018 9:43 AM, Steven D'Aprano wrote: On Thu, 30 Aug 2018 06:01:26 -0700, Tim wrote: I saw a thread on reddit/python where just about everyone said they never put code in their __init__ files. Pfft. Reddit users. They're just as bad as Stackoverflow users. *wink* Here's a stackoverf

Re: __init__ patterns

2018-08-30 Thread Steven D'Aprano
On Thu, 30 Aug 2018 06:01:26 -0700, Tim wrote: > I saw a thread on reddit/python where just about everyone said they > never put code in their __init__ files. Pfft. Reddit users. They're just as bad as Stackoverflow users. *wink* > Here's a stackoverflow thread saying the same thing. > https://

RE: __init__ patterns

2018-08-30 Thread Dan Strohl via Python-list
I will put imports into my __init__ files, so that I can import things from the module directly instead of having to import from a file in the module. I almost never put code in the __init__'s, I have a couple of times put in something that was designed to modify which routine was imported (i.e.

Re: __init__ patterns

2018-08-30 Thread Paul Moore
On Thu, 30 Aug 2018 at 14:07, Tim wrote: > > I saw a thread on reddit/python where just about everyone said they never put > code in their __init__ files. > > Here's a stackoverflow thread saying the same thing. > https://stackoverflow.com/questions/1944569/how-do-i-write-good-correct-package-ini