Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #55059
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Subject | Re: class implementation |
| Date | 2013-09-30 11:27 +0200 |
| Organization | None |
| References | <6e338858-b9e6-4745-9959-35d7c0c7724e@googlegroups.com> <2068fe39-3f52-4724-974a-97a4f8074ed4@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.478.1380533199.18130.python-list@python.org> (permalink) |
markotaht@gmail.com wrote: > esmaspäev, 30. september 2013 11:43.19 UTC+3 kirjutas mark...@gmail.com: >> Is there a way to give a class extra functions whidout editing the .py >> file where the class is located? > > But does it have all the variables that the main class have? Yes. You can invoke all methods of Car on a FlyingCar instance. If you don't define an __init__() method in FlyingCar the initializer of the parent class will be invoked which typically sets a few attributes (I think this is what you mean by variables; if not: please clarify). So just try it out. If you don't get your code to work you can post it here and ask for help on an actual piece of Python.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
class implementation markotaht@gmail.com - 2013-09-30 01:43 -0700
Re: class implementation Peter Otten <__peter__@web.de> - 2013-09-30 11:03 +0200
Re: class implementation markotaht@gmail.com - 2013-09-30 02:10 -0700
Re: class implementation Peter Otten <__peter__@web.de> - 2013-09-30 11:27 +0200
Re: class implementation markotaht@gmail.com - 2013-09-30 05:41 -0700
Re: class implementation Peter Otten <__peter__@web.de> - 2013-09-30 15:02 +0200
Re: class implementation Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-30 09:21 -0400
Re: class implementation Piet van Oostrum <piet@vanoostrum.org> - 2013-09-30 13:32 -0400
Re: class implementation Dave Angel <davea@davea.name> - 2013-09-30 19:34 +0000
Re: class implementation 88888 Dihedral <dihedral88888@gmail.com> - 2013-10-01 00:01 -0700
Re: class implementation Ned Batchelder <ned@nedbatchelder.com> - 2013-09-30 17:28 -0400
Re: class implementation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-30 23:45 +0000
Re: class implementation Ethan Furman <ethan@stoneleaf.us> - 2013-09-30 17:31 -0700
Re: class implementation random832@fastmail.us - 2013-09-30 17:49 -0400
Python variables? [was Re: class implementation] Ethan Furman <ethan@stoneleaf.us> - 2013-09-30 15:02 -0700
Re: Python variables? Ben Finney <ben+python@benfinney.id.au> - 2013-10-01 08:37 +1000
Re: Python variables? [was Re: class implementation] Ned Batchelder <ned@nedbatchelder.com> - 2013-09-30 19:45 -0400
Re: Python variables? [was Re: class implementation] "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2013-10-01 01:29 +0100
Re: Python variables? Ned Batchelder <ned@nedbatchelder.com> - 2013-09-30 19:47 -0400
Re: Python variables? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-01 01:03 +0000
Re: Python variables? Ned Batchelder <ned@nedbatchelder.com> - 2013-09-30 21:28 -0400
Re: class implementation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-01 00:19 +0000
Re: class implementation markotaht@gmail.com - 2013-10-06 06:15 -0700
Re: class implementation Terry Reedy <tjreedy@udel.edu> - 2013-10-06 15:52 -0400
Re: class implementation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-07 01:24 +0000
Re: class implementation markotaht@gmail.com - 2013-10-08 01:20 -0700
Re: class implementation Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-08 09:41 +0100
Re: class implementation Dave Angel <davea@davea.name> - 2013-10-08 10:31 +0000
Re: class implementation Cameron Simpson <cs@zip.com.au> - 2013-10-09 10:55 +1100
Re: class implementation markotaht@gmail.com - 2013-10-10 11:34 -0700
Re: class implementation Cameron Simpson <cs@zip.com.au> - 2013-10-11 09:07 +1100
Re: class implementation Piet van Oostrum <piet@vanoostrum.org> - 2013-10-10 19:29 -0400
Re: class implementation Ben Finney <ben+python@benfinney.id.au> - 2013-10-11 10:51 +1100
Re: class implementation markotaht@gmail.com - 2013-10-08 07:05 -0700
Re: class implementation "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2013-10-09 00:41 +0100
csiph-web