[Python-ideas] Avoid circular import
techtonik at gmail.com
Tue Apr 10 14:35:16 CEST 2012
On Tue, Apr 10, 2012 at 3:03 PM, Oleg Broytman <phd at phdru.name> wrote:
> On Tue, Apr 10, 2012 at 02:24:18PM +0300, Victor Varvariuc <victor.varvariuc at gmail.com> wrote:
>> On Tue, Apr 10, 2012 at 12:55 PM, Oleg Broytman <phd at phdru.name> wrote:
>> > My opinion is - restructure code to avoid circular import instead of
>> hacking import machinery.
>> It's not feasible sometimes.
JFY here is an example how to make it in general case.
Do you really fighting with this specific case? There is a solution to
that with delayed import.
More information about the Python-ideas