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 circular
On Mon, Nov 17, 2014 at 6:20 PM, Dave Angel da...@davea.name wrote:
Ian Kelly ian.g.ke...@gmail.com Wrote in message:
On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel da...@davea.name wrote:
In a module that might get tangled in a cycle, avoid global code
that depends on other modules. Instead
Ian Kelly ian.g.ke...@gmail.com Wrote in message:
On Mon, Nov 17, 2014 at 6:20 PM, Dave Angel da...@davea.name wrote:
Ian Kelly ian.g.ke...@gmail.com Wrote in message:
On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel da...@davea.name wrote:
In a module that might get tangled in a cycle, avoid
On Wed, Nov 19, 2014 at 6:09 AM, Dave Angel da...@davea.name 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
Chris Angelico ros...@gmail.com Wrote in message:
On Wed, Nov 19, 2014 at 6:09 AM, Dave Angel da...@davea.name 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
On Mon, 17 Nov 2014 08:08:40 +0100, dieter wrote:
Charles T. Smith cts.private.ya...@gmail.com 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
Charles T. Smith cts.private.ya...@gmail.com 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
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
On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel da...@davea.name wrote:
Charles T. Smith cts.private.ya...@gmail.com 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
Ian Kelly ian.g.ke...@gmail.com Wrote in message:
On Mon, Nov 17, 2014 at 3:17 PM, Dave Angel da...@davea.name 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
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
On Tue, Nov 18, 2014 at 1:17 PM, Rick Johnson
rantingrickjohn...@gmail.com wrote:
BOY I LOVE TROGGING!
For consistency, you should say GOVE there.
ChrisA
--
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 about
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 Sun, 16 Nov 2014 08:14:05 +0100, dieter wrote:
Charles T. Smith cts.private.ya...@gmail.com 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
On Sun, Nov 16, 2014 at 7:53 PM, Charles T. Smith
cts.private.ya...@gmail.com 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
Charles T. Smith cts.private.ya...@gmail.com 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
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
Charles T. Smith cts.private.ya...@gmail.com writes:
Now, I'm getting these errors:
Please reduce the problem to a minimal, complete example demonstrating
the behaviour URL:http://sscce.org/ so that you can show us exactly
what's happening.
AttributeError: 'module' object has no attribute
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 error
Charles T. Smith cts.private.ya...@gmail.com 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
21 matches
Mail list logo