Want - but cannot get - a nested class to inherit from outer class
castironpi at gmail.com
castironpi at gmail.com
Fri Mar 7 17:26:25 EST 2008
On Mar 7, 3:19 pm, "Chris Mellon" <arka... at gmail.com> wrote:
> On Fri, Mar 7, 2008 at 3:00 PM, DBak <david... at gmail.com> wrote:
>
> > I would like to build a class for a data structure such that nodes of
> > the data structure - of interest only to the data structure
> > implementation itself and not to the consumer - are instances of one
> > of two class types. I thought to encapsulate the nodes' classes
[a certain way]
> Not only is the name not defined, the class doesn't even exist yet.
>
> > What is the Pythonic thing I should be doing instead?
>
> Don't nest them. [ Too much anything is waste.]
You expose a problem with the way I and some others write code.
Humans have enormous "mental stacks"--- the stacks the contexts the
speakers speak in push things they're hearing on to. When writing for
computers, even those that speak Python, you have to say one thing at
a time, and let it get its mind around it. They're not that deep,
they're just at a deep depth. (The depth the ocean the submarine's in
has, not the depth the submarine's -at-.) Marvelous memories, though.
Your robotic snake can also do symbolic calculus, radio to clusters,
and generate arbitrary auditory waveforms. But in a snake, the snake
functions are primary. What's a multiplexer?
More information about the Python-list
mailing list