Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38929
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <bob.brusa@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'initialize': 0.05; 'class,': 0.07; 'received:192.168.178': 0.07; 'advice.': 0.09; 'specifying': 0.09; 'worked.': 0.09; 'def': 0.10; 'notations': 0.16; 'type:': 0.16; 'module': 0.19; 'statement': 0.23; 'downloaded': 0.24; 'tried': 0.25; 'header:User-Agent:1': 0.26; 'charset:iso-8859-15': 0.26; 'integrate': 0.27; 'things,': 0.29; 'definition': 0.29; 'class': 0.29; 'code': 0.31; 'to:addr:python- list': 0.33; 'hi,': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'offered': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'message-id:@gmail.com': 0.36; 'method': 0.36; 'received:209': 0.37; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'build': 0.39; 'received:192.168': 0.40; 'header:Reply-To:1': 0.68; 'reply- to:no real name:2**0': 0.72; 'reply-to:addr:gmail.com': 0.79; 'bob': 0.91; 'net.': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:reply-to:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=Bmqk575B6T3oBpkuYmN9RLCKE/XmZDo49emSkiRfm5o=; b=L5wGORO575Y0zqgwrZYbF/1vVw68i4PDkiPvQic789igMs5n6ULnlveyBHyQJH1jG4 c8rjqomaoYGIlQl0Wei3334UlW6oNN8f8HmG48Uq4Wi+dmZEG3XR9PiX4NIv/QFB0UsC 8QIKO6DMWyK1bGT90Qj74/gO7dKIzQjY0i7jFOLfpbZxKiprv/PZa32tWfb1d3gA8BXT Ivo5fh1+8VNq/3jK4HXUEffkhBIrW17nZmFtnuWuD+OoB2qSOKLL7Bz2ezWSLNA34XCH D9dixEUb3WM8D9xV9N/qH3AKhAyNZhKfgMOYJHTPn95t4p2CQQjf5fLkUcwrZgdBa6n6 xsdQ== |
| X-Received | by 10.14.182.137 with SMTP id o9mr10240223eem.13.1360947568677; Fri, 15 Feb 2013 08:59:28 -0800 (PST) |
| Date | Fri, 15 Feb 2013 17:59:29 +0100 |
| From | Bob Brusa <bob.brusa@gmail.com> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | inheritance and how to use it |
| Content-Type | text/html; charset=ISO-8859-15 |
| Content-Transfer-Encoding | 8bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | bob.brusa@gmail.com |
| 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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1819.1360947575.2939.python-list@python.org> (permalink) |
| Lines | 30 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1360947575 news.xs4all.nl 6985 [2001:888:2000:d::a6]:55379 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:38929 |
Show key headers only | View raw
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body text="#330099" bgcolor="#FFFFFF">
Hi,<br>
I use a module downloaded from the net. Now I want to build my own
class, based on the class SerialInstrument offered in this module -
and in my class I would like to initialize a few things, using e. g.
the method clear() offered by SerialInstrument. Hence I type:<br>
<br>
class myClass(SerialInstrument)<br>
self.clear(self)<br>
def f1(self, str1, str2)<br>
...do something etc.<br>
<br>
I then get the message "self not know" from the statement
self.clear(self). I have tried many other notations - none worked.
What works is however the following code - specifying myClass
without the self.clear(self) in it:<br>
<br>
x = myClass("argument")<br>
x.clear()<br>
<br>
How can I integrate this call into the definition of myClass? Thanks
for advice.<br>
Bob<br>
</body>
</html>
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
inheritance and how to use it Bob Brusa <bob.brusa@gmail.com> - 2013-02-15 17:59 +0100
Re: inheritance and how to use it Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2013-02-15 18:06 +0100
Re: inheritance and how to use it Bob Brusa <bob.brusa@gmail.com> - 2013-02-15 18:50 +0100
Re: inheritance and how to use it Dave Angel <davea@davea.name> - 2013-02-15 13:06 -0500
Re: inheritance and how to use it Bob Brusa <bob.brusa@gmail.com> - 2013-02-15 20:40 +0100
Re: inheritance and how to use it Tony the Tiger <tony@tiger.invalid> - 2013-02-19 16:04 -0600
csiph-web