variable access question

Neil Schemenauer nascheme at
Wed May 10 10:29:08 CEST 2000

oliver <fwang2 at> wrote:
>A beginner question: say I have the following classes A and B defined. 
>And B wants to access the variable "queue" inside A. How do i do that? or
>what is the most conventional way of doing it?

This is the answer to your question:

    class A:
        queue = Queue(10)

    class B:
        queue = A.queue

Are you sure you don't want to use instances and not classes?
You code seems to suggest you are confused. :)


More information about the Python-list mailing list