Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and appears to be fixed. Will keep monitoring.


devel / comp.lang.python / Re: learning python ...

SubjectAuthor
o Re: learning python ...Peter Otten

1
Re: learning python ...

<mailman.280.1621790913.3087.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13251&group=comp.lang.python#13251

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: __pete...@web.de (Peter Otten)
Newsgroups: comp.lang.python
Subject: Re: learning python ...
Date: Sun, 23 May 2021 19:28:24 +0200
Lines: 34
Message-ID: <mailman.280.1621790913.3087.python-list@python.org>
References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
<s8e3bn$105v$1@ciao.gmane.io>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de BcOiagK9KsBZlvGUPYx9rgzySmJdwZyJUn76rfrKie3w==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(which': 0.04;
'traceback': 0.04; '(most': 0.05; 'last):': 0.05;
'subject:python': 0.06; 'float': 0.07; '18,': 0.09; 'message-
id:@ciao.gmane.io': 0.09; 'received:ciao.gmane.io': 0.09;
'received:gmane.io': 0.09; 'received:list': 0.09; 'typeerror:':
0.09; 'float,': 0.16; 'from:addr:web.de': 0.16;
'received:116.202': 0.16; 'received:116.202.254': 0.16;
'received:116.202.254.214': 0.16; 'tuple': 0.16; 'wrote:': 0.16;
'python': 0.16; 'bug': 0.20; 'to:addr:python-list': 0.23; 'code':
0.24; '>>>': 0.26; 'error': 0.28; 'header:User-Agent:1': 0.31;
'it,': 0.31; 'but': 0.31; "i'm": 0.32; '"",': 0.32; 'program':
0.33; 'header:In-Reply-To:1': 0.33; 'following': 0.35; 'running':
0.35; 'file': 0.38; 'hi,': 0.39; 'example': 0.40; 'types': 0.63;
'your': 0.64; 'received:116': 0.71; 'little': 0.75
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
In-Reply-To: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
Content-Language: en-US
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <s8e3bn$105v$1@ciao.gmane.io>
X-Mailman-Original-References: <143d4163-faf5-3794-095d-f28e85a18c58@adminart.net>
 by: Peter Otten - Sun, 23 May 2021 17:28 UTC

On 23/05/2021 06:37, hw wrote:
>
> Hi,
>
> I'm starting to learn python and have made a little example program
> following a tutorial[1] I'm attaching.
>
> Running it, I'm getting:
>
>
> Traceback (most recent call last):
>   File "[...]/hworld.py", line 18, in <module>
>     print(isinstance(int, float))
> TypeError: isinstance() arg 2 must be a type or tuple of types
>
>
> I would understand to get an error message in line 5 but not in 18.  Is
> this a bug or a feature?

It is a bug in your code (which you don't provide). Did you assign some
value to float, e. g.:

>>> float = 42.0
>>> isinstance(int, float)
Traceback (most recent call last):
File "<pyshell#313>", line 1, in <module>
isinstance(int, float)
TypeError: isinstance() arg 2 must be a type or tuple of types

If you do not shadow the built-in you should get

>>> isinstance(int, float)
False

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor