Path: csiph.com!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'classes.': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:()': 0.09; 'subject:method': 0.09; 'jan': 0.11; 'read.': 0.13; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'str()': 0.16; 'wrote:': 0.16; 'library': 0.20; 'am,': 0.23; 'chapter': 0.23; 'header:In-Reply-To:1': 0.24; 'wondering': 0.25; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'class.': 0.30; 'certain': 0.31; 'class': 0.33; 'reference,': 0.33; 'functions.': 0.35; 'instance': 0.35; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'why': 0.39; 'to:addr:python.org': 0.40; 'construction': 0.72; 'received:fios.verizon.net': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Instance method for converting int to str - str() and __str__() Date: Sat, 3 Oct 2015 06:09:25 -0400 References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-59-124-74.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1443866983 news.xs4all.nl 23726 [2001:888:2000:d::a6]:35405 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:97367 On 10/3/2015 2:35 AM, neubyr wrote: > > I was wondering if there is any resource that explains why certain > methods like str() and type() These are classes. Calling a class calls the class construction and initialization functions. These return an instance of the class. While reading the tutorial, read the library reference, chapter 2. Chapter 4 is also extremely important to read. -- Terry Jan Reedy