Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.035 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'subject:Python': 0.06; 'string': 0.09; 'tia,': 0.09; 'language.': 0.14; 'called.': 0.16; 'iterable': 0.16; 'len,': 0.16; 'magic': 0.16; 'notation': 0.16; 'url:earth': 0.16; 'wa,': 0.16; 'wrote:': 0.18; 'things.': 0.19; 'meant': 0.20; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; '(like': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'usually': 0.31; 'produces': 0.31; 'them?': 0.31; 'types.': 0.31; 'up.': 0.33; 'url:python': 0.33; 'guess': 0.33; 'subject:the': 0.34; 'could': 0.34; 'one,': 0.35; 'operations': 0.35; 'but': 0.35; 'there': 0.35; 'earth': 0.36; 'url:listinfo': 0.36; 'charset:us-ascii': 0.36; "i'll": 0.36; 'url:org': 0.36; 'example,': 0.37; 'so,': 0.37; 'thank': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'pm,': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'url:mail': 0.40; 'how': 0.40; 'free': 0.61; 'day.': 0.63; 'different': 0.65; 'great': 0.65; 'usa': 0.69; 'messed': 0.84; 'operation)': 0.84 DomainKey-Signature: q=dns; a=rsa-sha1; c=nofws; d=inbox.com; s=s1; h=mime-version:date:message-id:from:subject:to:content-type; b=dd8yv07qTzXQvZHu3obx0W9SGAc2RINbxkVwz63Gcmfc0uzswClfR1Yf7614qoCweaDD cYw21aFMEgKvvKETkFd1Zi096NLs/9ua1TzxAw5lPzP65GG5qaoW9cnaf5mz5Mwh7gBOiZ vna2ZOP4mBCUkOthDaJrApdvn9Dg6e/dk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; q=dns/txt; d=inbox.com; s=s1; h=mime-version:date:message-id:subject:from:to:content-type; bh=BinDMm+ef9rdo3haWnsuwJGdLWye4SDKbZUbSg4BDX4=; b=oPvv+tF5qSXvl7/BGxfbDUudwViAvREzqLRvrCXKKmJUz6dWQBLX1LkG8pwpC64irnJw yk3I/I08pXVqk4pkHs/DyaXs+pBPGsk+e51b1OE5+tCTf5l6H6CqPVcYCc6UKhezfCq84V b0hAM0V5pkpLXa+7Fgxg5Xg7LsGmHL8E8= Mime-Version: 1.0 Date: Mon, 26 May 2014 07:15:53 -0800 From: Deb Wyatt Subject: Re: confused about the different built-in functions in Python To: python-list@python.org In-Reply-To: References: <648e6136a80.00000651codemonkey@inbox.com> X-Mailer: INBOX.COM X-Originating-IP: 98.247.209.87 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-IWM-ACU: c9dLWmy_RPM2SNmMgNUU9QSEJQ-nl8zU8wK8sWwPCSCM4hkScHoeSdEtTQdA nOvyz8RUpfDlPy7CVmtjqrBKDw8eIBIo1icVuUYupofViHoiE37sY-9Qi77m EG4MgG-lNsXUTRe1xdqk@ X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401117355 news.xs4all.nl 2874 [2001:888:2000:d::a6]:48180 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72068 >=20 > On 5/25/14 7:55 PM, Deb Wyatt wrote: >> I am confused about how various built-in functions are called. Some are >> called with dot notation >>=20 >> How do you know/remember which way to call them? >>=20 >> TIA, >> Deb in WA, USA >=20 > It can be confusing. Generally, built-in functions (like sum, len, etc) > are used when the operation could apply to many different types. For > example, sum() can be used with any iterable that produces addable > things. >=20 > Operations that are defined only for a single type (like .isalpha as a > string operation) are usually defined as methods on the type. >=20 > This is not a black/white distinction, I'm sure there are interesting > counter-examples. But this is the general principle. >=20 > -- > Ned Batchelder, http://nedbatchelder.com >=20 > -- > https://mail.python.org/mailman/listinfo/python-list Thank you for answering. I meant to send this to the tutor list, but = messed up. So, I guess there isn't a magic answer to this one, and I'll = learn as I learn the language. Have a great day. Deb in WA, USA ____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop=21 Check it out at http://www.inbox.com/earth