Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:not': 0.03; 'problem?': 0.07; "subject:' ": 0.07; 'dst': 0.09; 'cc:addr :python-list': 0.11; 'callable': 0.16; 'defined.': 0.16; 'subject:object': 0.16; 'typeerror:': 0.16; 'url:time': 0.16; 'wrote:': 0.18; 'variable': 0.18; '>>>': 0.22; 'import': 0.22; 'aug': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; '>>>': 0.24; 'integer': 0.24; 'non': 0.24; 'cc:2**0': 0.24; 'second': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'lines': 0.31; '"",': 0.31; 'file': 0.32; 'url:python': 0.33; '(most': 0.33; 'problem': 0.35; 'received:google.com': 0.35; 'module.': 0.36; 'url:listinfo': 0.36; 'method': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'clear': 0.37; 'skip:& 10': 0.38; 'url:library': 0.38; 'recent': 0.39; 'skip:& 20': 0.39; 'url:mail': 0.40; 'how': 0.40; 'solve': 0.60; 'dear': 0.65; 'to:addr:gmail.com': 0.65; 'friends': 0.81; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=emNVe9tYyYn4py7d6HOUNWdfBWggykmCtlOPJvCfxZA=; b=zaB/qznKSs53wRGUzG+yB4q1Iwz2Aqz3c8su5CBiaCBGFwtQ/LDqjcyoi8J8v/WTb5 dywYgtU3A4UjswSYcznJPUA8AG4YsPgIQowvoJG+AXexaBqJ6SKgzNq9hFVwL/W5U12h gCYcYx5DmG1pCY1LrJbDECKOgIt3AYQ+O1Yyu1zTd8OBJoOG1J9bi2iB9OxpCEiIQ/W4 2/uz6PW9eKKBL2y/LXaXzfjSmKLpIR+EiefkORWELyi4ATE3HcQWf8E7/QYqlefNIMLS xeX7BN/rjXhHvwfQxa7nxXtSbSTJlLpHx1b7mzriitn4XQdIGPOsNKoTljeDS0H2WAer IH9A== MIME-Version: 1.0 X-Received: by 10.180.109.35 with SMTP id hp3mr9632631wib.52.1377573788732; Mon, 26 Aug 2013 20:23:08 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Aug 2013 08:53:08 +0530 Subject: Re: TypeError: 'int' object is not callable From: Krishnan Shankar To: autobotprime.17@gmail.com Content-Type: multipart/alternative; boundary=e89a8f3ba25b54544604e4e5642e Cc: Python 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: 94 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1377573795 news.xs4all.nl 15895 [2001:888:2000:d::a6]:51886 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53027 --e89a8f3ba25b54544604e4e5642e Content-Type: text/plain; charset=ISO-8859-1 Hi, The problem is in the second line. a = time.daylight() The daylight is not a method in time module. It is clear here, http://docs.python.org/2/library/time.html Since it is not a method we cannot call it. It is just a integer variable . It returns zero if DST timezone is not defined and returns non zero if defined. >>> import time >>> a = time.daylight() Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not callable >>> a = time.daylight >>> a 0 >>> type(time.daylight) Regards, Krishnan On Tue, Aug 27, 2013 at 8:15 AM, wrote: > dear friends when i try to execute following lines > > import time > a = time.daylight() > print(a) > > > result is > TypeError: 'int' object is not callable > > > why is this error and how can i solve this problem? > -- > http://mail.python.org/mailman/listinfo/python-list > --e89a8f3ba25b54544604e4e5642e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

The problem is in the second = line.=A0

a =3D time.daylight()

The daylight is not a method in time module. = It is clear here,

Since it is not a method we cannot call it. It is just a integer variab= le . It returns zero if DST timezone is not defined and returns non zero if= defined.

>>> import time
>= ;>> a =3D time.daylight()
Traceback (most recent call last)= :
=A0 File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable
>>>= a =3D time.daylight
>>> a
0
>>= ;> type(time.daylight)
<type 'int'>

Regards,
Krishnan


On Tue, Aug 27, = 2013 at 8:15 AM, <autobotprime.17@gmail.com> wrote:=
dear friends when i try to execute following= lines

import time
a =3D time.daylight()
print(a)


result is
TypeError: 'int' object is not callable


why is this error and how can i solve this problem?
--
http://mail.python.org/mailman/listinfo/python-list

--e89a8f3ba25b54544604e4e5642e--