On Oct 24, 7:27 pm, Derek Martin [EMAIL PROTECTED] wrote:
On Fri, Oct 24, 2008 at 11:59:46AM +1000, James Mills wrote:
On Fri, Oct 24, 2008 at 11:36 AM, John Ladasky [EMAIL PROTECTED] wrote:
etc. The list of subclasses is not fully defined. It is supposed to
be extensible by the user.
On Thu, 23 Oct 2008 20:53:03 -0700, John Ladasky wrote:
On Oct 23, 6:59 pm, James Mills [EMAIL PROTECTED] wrote:
Developer. NOT User.
For the foreseeable future, this program is for my use only. So the
developer and the user are one and the same.
And, thank you, __bases__ is what I
On Fri, Oct 24, 2008 at 11:59:46AM +1000, James Mills wrote:
On Fri, Oct 24, 2008 at 11:36 AM, John Ladasky [EMAIL PROTECTED] wrote:
etc. The list of subclasses is not fully defined. It is supposed to
be extensible by the user.
Developer. NOT User.
It's a semantic argument, but John's
Developer. NOT User.
I go around and around on this issue, and have ended up considering
anyone using my code a user, and if it's a library or class system,
likely that user is a programmer. I don't really think there is a
strong distinction... more and more users can do sophisticated
Thank you, Chris. Class.__bases__ is exactly what I wanted to see.
And I thought I had tried isinstance(), and found it lacking -- but I
just tried it again, and it does what I hoped it would do.
While isinstance is no doubt the proper way to access this
information, you may have run into
Hello again!
Suppose that I have several subclasses which inherit from a base
class, thus:
class Foo(object):
class Spam1(Foo):
class Spam2(Foo):
class Spam3(Foo):
etc. The list of subclasses is not fully defined. It is supposed to
be extensible by the user.
Many methods will differ
I forgot to add -- though I suspect it should not matter -- I'm using
Python 2.5.1 on Ubuntu Linux 8.04.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Oct 23, 2008 at 6:36 PM, John Ladasky [EMAIL PROTECTED] wrote:
Hello again!
Suppose that I have several subclasses which inherit from a base
class, thus:
class Foo(object):
class Spam1(Foo):
class Spam2(Foo):
class Spam3(Foo):
etc. The list of subclasses is not fully
On Fri, Oct 24, 2008 at 11:36 AM, John Ladasky [EMAIL PROTECTED] wrote:
etc. The list of subclasses is not fully defined. It is supposed to
be extensible by the user.
Developer. NOT User.
Consider:
$ python
Python 2.5.2 (r252:60911, Oct 13 2008, 15:09:03)
[GCC 4.2.4 (CRUX)] on linux2
Type
On Oct 23, 6:56 pm, Chris Rebert [EMAIL PROTECTED] wrote:
In __bases__, e.g. Spam1.__bases__, which would be (class '__main__.Foo',).
In practice, you probably just want to use if isinstance(some_obj,
Foo): which will be true for SpamN instances.
Thank you, Chris. Class.__bases__ is
On Oct 23, 6:59 pm, James Mills [EMAIL PROTECTED]
wrote:
Developer. NOT User.
For the foreseeable future, this program is for my use only. So the
developer and the user are one and the same.
And, thank you, __bases__ is what I was looking for. Though Chris
Mills also pointed out that
11 matches
Mail list logo