Re: Help creating new module which inherits existing class from another module.

2014-02-19 Thread Ben Finney
Jonno writes: > Let's say the existing module provides a class RoboCom() which allows > the user to communicate with robots (it doesn't). Well, can you say what it *does* do? These hypotheticals aren't very helpful; I don't know what inferences I'm safe to draw from the made-up situation. What i

Re: Help creating new module which inherits existing class from another module.

2014-02-19 Thread biolord9
On Tuesday, February 18, 2014 3:34:51 PM UTC-5, Jonno wrote: > I'm not sure if this list is a suitable place to ask for this kind of help so > if it's not please just suggest another forum which might be more suitable. > > > > > I'm looking for help/suggestions how to architect a module (perha

Re: Help creating new module which inherits existing class from another module.

2014-02-19 Thread Jonno
> > > > The idea is that when you have a NewClass instance, calling > "newobject.foo" will automatically call the descriptor's __getmethod__, > passing it the class and instance. That descriptor will create and > populate the FooClass instance, which does the real work. > > Descriptors are how meth

Re: Help creating new module which inherits existing class from another module.

2014-02-19 Thread Jonno
On Tue, Feb 18, 2014 at 11:48 PM, Ben Finney wrote: > Jonno writes: > > > I tried to explain the necessary properties in the requirements below. > > What you've described is a bunch of abstract behaviour. > > But as I said, I'm suspecting this is a poor design; and I can't know > better until you

Re: Help creating new module which inherits existing class from another module.

2014-02-18 Thread Steven D'Aprano
On Tue, 18 Feb 2014 14:34:51 -0600, Jonno wrote: > There is an existing module I want to use which has a class we'll call > *Existing Class*. > > I want to create a python module which allows me to create *new_objects* > with the following properties: > >- The new_objects have all the attrib

Re: Help creating new module which inherits existing class from another module.

2014-02-18 Thread Ben Finney
Jonno writes: > I tried to explain the necessary properties in the requirements below. What you've described is a bunch of abstract behaviour. But as I said, I'm suspecting this is a poor design; and I can't know better until you explain what all this is *for*. What is the purpose of the code

Re: Help creating new module which inherits existing class from another module.

2014-02-18 Thread Jonno
Ben, Thanks for your reply. I'll try to ellaborate a little more in the comments below. On Tue, Feb 18, 2014 at 2:47 PM, Ben Finney wrote: > Jonno writes: > > > I'm not sure if this list is a suitable place to ask for this kind of > > help so if it's not please just suggest another forum which

Re: Help creating new module which inherits existing class from another module.

2014-02-18 Thread Ben Finney
Jonno writes: > I'm not sure if this list is a suitable place to ask for this kind of > help so if it's not please just suggest another forum which might be > more suitable. Welcome! Asking for help with writing Python code is definitely suitable here. > I'm looking for help/suggestions how to

Help creating new module which inherits existing class from another module.

2014-02-18 Thread Jonno
I'm not sure if this list is a suitable place to ask for this kind of help so if it's not please just suggest another forum which might be more suitable. I'm looking for help/suggestions how to architect a module (perhaps just a class). There is an existing module I want to use which has a class