Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #32825

Re: Base class and Derived class question

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <cyberirakli@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'interpreter': 0.04; 'correct.': 0.07; 'subject:question': 0.08; 'python': 0.09; 'brackets': 0.09; 'derived': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.10; '2.7.3': 0.16; 'angle': 0.16; 'run:': 0.16; 'subject:class': 0.16; 'import': 0.21; "i've": 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:[ 10': 0.26; 'cc:addr:gmail.com': 0.27; 'cc:2**2': 0.27; "doesn't": 0.28; 'this?': 0.28; 'indentation': 0.29; 'source': 0.29; 'class': 0.29; 'error': 0.30; 'code': 0.31; 'file': 0.32; 'running': 0.32; 'print': 0.32; 'idle': 0.33; 'skip:d 20': 0.34; 'version': 0.34; 'received:google.com': 0.34; 'open': 0.35; 'posting': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'called': 0.39; 'from:no real name:2**0': 0.60; 'confusing': 0.84; 'cc:no real name:2**2': 0.91
Newsgroups comp.lang.python
Date Tue, 6 Nov 2012 07:03:01 -0800 (PST)
In-Reply-To <mailman.3324.1352211254.27098.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=90.163.62.20; posting-account=4MmJjAoAAAAh9Xp7DS1V1sLlN8hNHPkA
References <fda16cf9-38dd-49ae-9f49-92bc963aac2e@googlegroups.com> <mailman.3324.1352211254.27098.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 90.163.62.20
MIME-Version 1.0
Subject Re: Base class and Derived class question
From cyberirakli@gmail.com
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Cc cyberirakli@gmail.com, d@davea.name, python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.3327.1352214191.27098.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1352214191 news.xs4all.nl 6874 [2001:888:2000:d::a6]:42126
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:32825

Show key headers only | View raw


> in what Python version ?

 Python 2.7.3
 

> How did all those angle brackets get into the file?  Are you confusing
> 
> an interactive interpreter session with running source files?

I've used angle brackets just for posting here,becauze this forum doesn't support [code][/code]

I have a file called baseClass.py with code abouve and indentation is correct.
Then I open  python IDLE and type :
import baseClass as baseClassMod
reload(baseClassMod

class derivedClass(baseClassMod):
    def dFunction(self):
        print "We are in a derived Class"

After that i get the error above. But if I paste in Python IDLE a code from baseClass.py and just run:
class derivedClass(baseClass):
    def dFunction(self):
        print "We are in a derived Class"

it works perfectly. 
Why happen this? 

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Base class and Derived class question cyberirakli@gmail.com - 2012-11-06 05:50 -0800
  Re: Base class and Derived class question Dave Angel <d@davea.name> - 2012-11-06 09:13 -0500
    Re: Base class and Derived class question cyberirakli@gmail.com - 2012-11-06 07:03 -0800
      Re: Base class and Derived class question Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-06 08:34 -0700
        Re: Base class and Derived class question cyberirakli@gmail.com - 2012-11-06 08:22 -0800
        Re: Base class and Derived class question cyberirakli@gmail.com - 2012-11-06 08:22 -0800
    Re: Base class and Derived class question cyberirakli@gmail.com - 2012-11-06 07:03 -0800
  Re: Base class and Derived class question cyberirakli@gmail.com - 2012-11-06 07:08 -0800
    Re: Base class and Derived class question alex23 <wuwei23@gmail.com> - 2012-11-06 18:10 -0800

csiph-web