On Thu, Feb 23, 2017 at 09:40:14PM +1100, Steven D'Aprano wrote:
> How do instance attributes normally get set? In the __init__ method:
>
> class MyClass:
> def __init__(self):
> self.attribute = None
>
>
> If the __init__ method does get run, it doesn't get the chance to create
>
On Wed, Feb 22, 2017 at 10:49 PM, Zachary Ware
wrote:
> On Wed, Feb 22, 2017 at 10:25 PM, boB Stepp wrote:
>
> I'll give you a couple of hints. First, try this:
>
> print('defining A')
> class A:
> print('Setting a on class A')
When I typed this in I was surprised to find that the print()
Thank you to everyone that provided illumination in this thread!
Things seem much clearer now, which caused me to realize that what I
wrote below cannot work as written (Even though I did copy and paste
it from the interpreter):
On Wed, Feb 22, 2017 at 10:53 PM, boB Stepp wrote:
> On Wed, Feb 22,
On 23/02/17 22:25, Pooja Bhalode wrote:
> I am working on GUI where I have two dropdown menus in a Toplevel of the
> main root.
That's not what your code shows. It shows scrolling listboxes, not
menus. But it seems like a Frame with a set of checkboxes would be
closer to what you actually want?
On 23/02/17 22:16, Quang nguyen wrote:
> Hi everyone,
> I need to open a terminal on Raspberry Pi 2 in order to execute codesend of
> 433Utils to send a signal to RF Receiver. Anyone know how to open a
> terminal?
Do you really need a terminal? Or do you only need to execute some commands?
In eit
Hi,
I am working on GUI where I have two dropdown menus in a Toplevel of the
main root. Here, both the dropdown menus have mutiple selection option and
thus, the selections can be taken as an input from the user and printed out
in the code.
The window shows as below:
[image: Inline image 1]
Where
Hi everyone,
I need to open a terminal on Raspberry Pi 2 in order to execute codesend of
433Utils to send a signal to RF Receiver. Anyone know how to open a
terminal?
Thank you.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
On Wed, Feb 22, 2017 at 10:25:58PM -0600, boB Stepp wrote:
> I am trying to wrap my head around the mechanics of inheritance in
> Python 3.
Here is a simplified picture of how inheritence usually works in Python.
For an instance `spam`, when you look up an attribute (which includes
methods), Pyt
On 23/02/17 04:25, boB Stepp wrote:
> I am trying to wrap my head around the mechanics of inheritance in
> Python 3. I thought that all attributes of a superclass were
> accessible to an instance of a subclass.
For class attributes that happens automatically.
>>> class A:
a = 'A'
On Wed, Feb 22, 2017 at 10:25:58PM -0600, boB Stepp wrote:
> I am trying to wrap my head around the mechanics of inheritance in
> Python 3. I thought that all attributes of a superclass were
> accessible to an instance of a subclass. But when I try the
> following:
>
> py3: class A:
> ... de
boB Stepp wrote:
> On Wed, Feb 22, 2017 at 10:25 PM, boB Stepp
> wrote:
>> I am trying to wrap my head around the mechanics of inheritance in
>> Python 3. I thought that all attributes of a superclass were
>> accessible to an instance of a subclass. But when I try the
>> following:
>>
>> py3: c
11 matches
Mail list logo