On 2017-02-22 20:53, 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:
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: class A:
> ... def __init
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.
>
> Obviously I am horribly misunderstanding something, and being
> cur
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:
... def __init__(self):
... self.aa = 'class A'
...
py3: class B(A)
On 22/02/17 02:55, Francis Pino wrote:
> I need to recode my hotel ratings as 1-3 = Negative and 4-5 Positive. Can
> you help point me in the direction to do this? I know I need to make a loop
> using for and in and may statement like for rating in review if review >= 3
> print ('Negative') else
I need to recode my hotel ratings as 1-3 = Negative and 4-5 Positive. Can
you help point me in the direction to do this? I know I need to make a loop
using for and in and may statement like for rating in review if review >= 3
print ('Negative') else print 'Negative'. Here's my code so far.
fr