On 22Jul2018 15:38, Mark Lawrence wrote:
On 22/07/18 05:45, Cameron Simpson wrote:
Circular imports: 2 codependent modules. If you have:
module A:
import B
module B:
import B
That won't work: the second import (whichever it turns out to be)
will fail. One workaround is to make one of
On 22/07/18 05:45, Cameron Simpson wrote:
On 22Jul2018 06:43, Abdur-Rahmaan Janhangeer wrote:
i have found some reputable books that include import within code
with ...
import x
if ...
import y
def ...
import z
according to me they should be placed at the top. but an advantage of
Abdur-Rahmaan Janhangeer writes:
> i have found some reputable books that include import within code
>
> with ...
> import x
>
> if ...
> import y
>
> def ...
> import z
>
> according to me they should be placed at the top. but an advantage of it is
> optimisation where you only load
>
>
> apart from circular imports?
>
sorry your last mail was sent to spam by gmail. now seeing it . thank you !
--
Abdur-Rahmaan Janhangeer
https://github.com/abdur-rahmaanj
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Jul 22, 2018 at 8:49 AM Cameron Simpson wrote:
> On 22Jul2018 14:45, Cameron Simpson wrote:
> >Circular imports: 2 codependent modules.
apart from circular imports?
--
Abdur-Rahmaan Janhangeer
https://github.com/abdur-rahmaanj
Mauritius
--
https://mail.python.org/mailman/listinfo/pyt
On 22Jul2018 14:45, Cameron Simpson wrote:
Circular imports: 2 codependent modules. If you have:
module A:
import B
module B:
import B
That won't work: the second import (whichever it turns out to be) will
fail. One workaround is to make one of the modules put off the
import. A better
On 22Jul2018 06:43, Abdur-Rahmaan Janhangeer wrote:
i have found some reputable books that include import within code
with ...
import x
if ...
import y
def ...
import z
according to me they should be placed at the top. but an advantage of it is
optimisation where you only load modu
i have found some reputable books that include import within code
with ...
import x
if ...
import y
def ...
import z
according to me they should be placed at the top. but an advantage of it is
optimisation where you only load modules if necessary
so, import within code can be call