Chris Angelico Wrote in message:
> On Wed, Nov 19, 2014 at 6:09 AM, Dave Angel wrote:
>> I once worked on (and then
>> fixed) a build system that could not complete a build from clean.
>> It needed some pieces from a previous build in order to get to
>> the point where it was ready to build th
On Wed, Nov 19, 2014 at 6:09 AM, Dave Angel wrote:
> I once worked on (and then
> fixed) a build system that could not complete a build from clean.
> It needed some pieces from a previous build in order to get to
> the point where it was ready to build those pieces. Recursive
> depencies at co
Ian Kelly Wrote in message:
> On Mon, Nov 17, 2014 at 6:20 PM, Dave Angel wrote:
>> Ian Kelly Wrote in message:
>>> On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel wrote:
>>
In a module that might get tangled in a cycle, avoid global code
that depends on other modules. Instead of puttin
On Mon, Nov 17, 2014 at 6:20 PM, Dave Angel wrote:
> Ian Kelly Wrote in message:
>> On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel wrote:
>
>>> In a module that might get tangled in a cycle, avoid global code
>>> that depends on other modules. Instead of putting such
>>> initialization at top le
On Tue, 18 Nov 2014 00:00:42 -0700, Michael Torrie wrote:
> On 11/17/2014 03:45 PM, Steven D'Aprano wrote:
>
>> Circular dependencies are not just a problem in Python, they are a
>> problem throughout most of software design.
>
> Personally I find that duck typing eliminates a lot of the circula
On Mon, 17 Nov 2014 18:17:13 -0800, Rick Johnson wrote:
> BOY I LOVE TROGGING!
Yes, we've noticed.
http://www.urbandictionary.com/define.php?term=trogging
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On 11/17/2014 03:45 PM, Steven D'Aprano wrote:
> Circular dependencies are not just a problem in Python, they are a problem
> throughout most of software design.
Personally I find that duck typing eliminates a lot of the circular
dependency problems. Class A doesn't necessarily have to know abou
On Tue, Nov 18, 2014 at 1:17 PM, Rick Johnson
wrote:
> BOY I LOVE TROGGING!
For consistency, you should say GOVE there.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On Monday, November 17, 2014 4:46:05 PM UTC-6, Steven D'Aprano wrote:
> [...]
> Python is not Java, nor Perl, and if you're putting every
> class into its own file, you are doing it wrong.
Stop making these gross generalizations. Just because Java
*REQUIRES* that you only have one class per file d
Ian Kelly Wrote in message:
> On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel wrote:
>> In a module that might get tangled in a cycle, avoid global code
>> that depends on other modules. Instead of putting such
>> initialization at top level, put inside a function that gets
>> called after all s
On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel wrote:
> "Charles T. Smith" Wrote in message:
>
>> Well, I guess that's the definitive answer... the tips for delaying
>> import are good, I'll try to leverage them.
>>
>> I was hoping there would be a way to have python postpone evaluation
>> similar t
Charles T. Smith wrote:
> Yes, we're talking about recursive imports here. It's a complex, object-
> oriented system with big classes and little classes that are strongly
> interrelated.
Well, there's your problem right there. You're working with a complex,
highly coupled code-base. Alarms bells
"Charles T. Smith" Wrote in message:
> Well, I guess that's the definitive answer... the tips for delaying
> import are good, I'll try to leverage them.
>
> I was hoping there would be a way to have python postpone evaluation
> similar to C's forward references.
>
In a module that might get ta
On Mon, 17 Nov 2014 08:08:40 +0100, dieter wrote:
> "Charles T. Smith" writes:
>> ...
>> Are others equally frustrated by this or is there a trick or principle
>> that I'm missing. At this point, I guess the way I'll have to proceed
>> is to put every class in its own file, no matter how small.
"Charles T. Smith" writes:
> ...
> Are others equally frustrated by this or is there a trick or principle
> that I'm missing. At this point, I guess the way I'll have to proceed is
> to put every class in its own file, no matter how small. Hopefully that
> takes care of the problem.
Recursiv
On Sun, Nov 16, 2014 at 7:53 PM, Charles T. Smith
wrote:
> Yes, we're talking about recursive imports here. It's a complex, object-
> oriented system with big classes and little classes that are strongly
> interrelated. I can get the imports configured properly so everything
> works but if I mak
On Sun, 16 Nov 2014 08:14:05 +0100, dieter wrote:
> "Charles T. Smith" writes:
>> Now, I'm getting these errors:
>>
>> ImportError: cannot import name ...
>>
>> and
>>
>> AttributeError: 'module' object has no attribute ...
>>
>> (what is 'module'?)
>>
>> Is there a way to resolve this withou
"Charles T. Smith" writes:
> Now, I'm getting these errors:
>
> ImportError: cannot import name ...
>
> and
>
> AttributeError: 'module' object has no attribute ...
>
> (what is 'module'?)
>
> Is there a way to resolve this without having to restructure my code
> every couple of days?
>
> I t
On Sat, 15 Nov 2014 22:52:33 +, Charles T. Smith wrote:
> Now, I'm getting these errors:
>
> ImportError: cannot import name ...
>
> and
>
> AttributeError: 'module' object has no attribute ...
It would be useful to know what you're actually trying to import and what
the complete erro
"Charles T. Smith" writes:
> Now, I'm getting these errors:
Please reduce the problem to a minimal, complete example demonstrating
the behaviour http://sscce.org/> so that you can show us exactly
what's happening.
> AttributeError: 'module' object has no attribute ...
>
> (what is 'module'?)
Now, I'm getting these errors:
ImportError: cannot import name ...
and
AttributeError: 'module' object has no attribute ...
(what is 'module'?)
Is there a way to resolve this without having to restructure my code
every couple of days?
I thought using imports of the form:
from module i
21 matches
Mail list logo