Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72091
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
| Newsgroups | comp.lang.python |
| Subject | Re: confused about the different built-in functions in Python |
| Date | Tue, 27 May 2014 11:14:38 +1200 |
| Lines | 16 |
| Message-ID | <bui06sFbst8U1@mid.individual.net> (permalink) |
| References | <648e6136a80.00000651codemonkey@inbox.com> <6C977160E42.0000036Ccodemonkey@inbox.com> <mailman.10353.1401130279.18130.python-list@python.org> <87r43gfjqy.fsf@elektro.pacujo.net> <mailman.10356.1401133664.18130.python-list@python.org> <87ioosffh3.fsf@elektro.pacujo.net> <87egzgfe9u.fsf@elektro.pacujo.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net TaZMkcX+GwoaShUJaxUQFQO51oqAUNFjWZCMbNirP8L23EoFTy |
| Cancel-Lock | sha1:e/lLNctTuONmfbxl7KG3k2cY/JQ= |
| User-Agent | Mozilla Thunderbird 1.0.5 (Macintosh/20050711) |
| X-Accept-Language | en-us, en |
| In-Reply-To | <87egzgfe9u.fsf@elektro.pacujo.net> |
| Xref | csiph.com comp.lang.python:72091 |
Show key headers only | View raw
Marko Rauhamaa wrote: > IOW, you can override a method with setattr() but you cannot delete a > method with delattr(). Actually, you can -- but you need to delete it from the class, not the instance: >>> delattr(X, 'f') >>> x.f() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'X' object has no attribute 'f' -- Greg
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: confused about the different built-in functions in Python Terry Reedy <tjreedy@udel.edu> - 2014-05-26 14:51 -0400
Re: confused about the different built-in functions in Python Marko Rauhamaa <marko@pacujo.net> - 2014-05-26 22:00 +0300
Re: confused about the different built-in functions in Python Christian Heimes <christian@python.org> - 2014-05-26 21:47 +0200
Re: confused about the different built-in functions in Python Marko Rauhamaa <marko@pacujo.net> - 2014-05-26 23:32 +0300
Re: confused about the different built-in functions in Python Marko Rauhamaa <marko@pacujo.net> - 2014-05-26 23:58 +0300
Re: confused about the different built-in functions in Python Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-05-27 11:14 +1200
Re: confused about the different built-in functions in Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-27 01:21 +0000
Re: confused about the different built-in functions in Python Terry Reedy <tjreedy@udel.edu> - 2014-05-26 22:00 -0400
csiph-web