Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82649
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!gordon |
|---|---|
| From | John Gordon <gordon@panix.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: problems with Methods in Python 3.4.2 |
| Date | Thu, 18 Dec 2014 18:45:03 +0000 (UTC) |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Lines | 21 |
| Message-ID | <m6v7bf$904$1@reader1.panix.com> (permalink) |
| References | <mailman.17037.1418923700.18130.python-list@python.org> |
| NNTP-Posting-Host | panix3.panix.com |
| X-Trace | reader1.panix.com 1418928303 9220 166.84.1.3 (18 Dec 2014 18:45:03 GMT) |
| X-Complaints-To | abuse@panix.com |
| NNTP-Posting-Date | Thu, 18 Dec 2014 18:45:03 +0000 (UTC) |
| User-Agent | nn/6.7.3 |
| Xref | csiph.com comp.lang.python:82649 |
Show key headers only | View raw
In <mailman.17037.1418923700.18130.python-list@python.org> =?iso-8859-1?Q?Marcus_L=FCtolf?= <marcus.luetolf@bluewin.ch> writes:
> >>> dir(_builtins_)
> >>> 'TTA',_add_('GGA')
> >>>abs._doc_()
These errors are due to using single underscores instead of double
underscores. I.e. use __builtins__ instead of _builtins_.
> >>> -3 .abs()
> AttributeError: 'int' object has no attribute 'abs'
Integer objects don't have a built-in function named abs(). If you
want the absolute value of an integer, call abs directly, like so:
abs(-3)
--
John Gordon Imagine what it must be like for a real medical doctor to
gordon@panix.com watch 'House', or a real serial killer to watch 'Dexter'.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
problems with Methods in Python 3.4.2 Marcus Lütolf <marcus.luetolf@bluewin.ch> - 2014-12-18 18:27 +0100 Re: problems with Methods in Python 3.4.2 André Roberge <andre.roberge@gmail.com> - 2014-12-18 09:44 -0800 Re: problems with Methods in Python 3.4.2 John Gordon <gordon@panix.com> - 2014-12-18 18:45 +0000
csiph-web