Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <mailman.100.1710551196.3452.python-list@python.org>
Deutsch   English   Français   Italiano  
<mailman.100.1710551196.3452.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: <avi.e.gross@gmail.com>
Newsgroups: comp.lang.python
Subject: RE: Configuring an object via a dictionary
Date: Fri, 15 Mar 2024 21:06:31 -0400
Lines: 45
Message-ID: <mailman.100.1710551196.3452.python-list@python.org>
References: <87y1ajdeqs.fsf@zedat.fu-berlin.de>
 <3cbc94a7-bf8e-4ee7-ae70-ba8b73ec61bd@tompassin.net>
 <4TxDMW3Dn1znVFX@mail.python.org>
 <b169e599-e81f-45ce-8e2a-7027b59a4627@tompassin.net>
 <ZfS-lbUP1bY04LNI@anomaly>
 <003301da773e$2f54b850$8dfe28f0$@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de ZEGLHz9Eo75qCQXAzz2v1Q3ci668hMiip3YvuI+/ao1w==
Cancel-Lock: sha1:H8Dk1YCUVNFXh3ok6hr7U5mU/A4= sha256:hLG924ts6TFqtCTytKIUdUrl8eWMG/xX9vcdi9bFf9k=
Return-Path: <avi.e.gross@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=gmail.com header.i=@gmail.com header.b=lQoczvN4;
 dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.109
X-Spam-Level: *
X-Spam-Evidence: '*H*': 0.78; '*S*': 0.00; 'fairly': 0.05; ':-)':
 0.09; 'configuring': 0.09; 'dan': 0.09; 'expression': 0.09;
 'received:108': 0.09; 'url:mailman': 0.15; '2024': 0.16;
 'anyway.': 0.16; 'evaluated': 0.16; 'follows': 0.16; 'languages.':
 0.16; 'wrote:': 0.16; 'python': 0.16; 'code.': 0.17; 'message-
 id:@gmail.com': 0.18; 'to:addr:python-list': 0.20; 'all,': 0.20;
 'language': 0.21; 'to:no real name:2**1': 0.22; 'skip:- 10': 0.25;
 'url-ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24': 0.25;
 'actual': 0.25; 'url:listinfo': 0.25; 'url-ip:188.166/16': 0.25;
 'anyone': 0.25; 'behavior': 0.26; 'brings': 0.26; 'friday,': 0.26;
 'object': 0.26; 'function': 0.27; 'expect': 0.28; 'takes': 0.31;
 'flow': 0.31; 'url-ip:188/8': 0.31; 'concept': 0.32; 'context':
 0.32; 'python-list': 0.32; 'but': 0.32; 'there': 0.33; 'march':
 0.33; 'same': 0.34; 'header:In-Reply-To:1': 0.34;
 'received:google.com': 0.34; 'from:addr:gmail.com': 0.35;
 'really': 0.37; 'received:209.85': 0.37; 'way': 0.38;
 'received:209': 0.39; 'use': 0.39; 'serious': 0.40; 'wants': 0.40;
 'both': 0.40; 'something': 0.40; 'want': 0.40; 'should': 0.40;
 'view': 0.60; 'above': 0.62; 'from:': 0.62; 'to:': 0.62; 'seen':
 0.62; 're:': 0.64; 'thus': 0.64; 'back': 0.67; 'maintenance':
 0.67; 'types,': 0.69; 'rules': 0.70; 'care': 0.71; 'future': 0.72;
 'easy': 0.74; 'demand': 0.75; 'sent:': 0.78; 'returned': 0.81;
 'left': 0.83; 'clause': 0.84; 'control.': 0.84; 'corners': 0.84;
 'rare': 0.84; 'truth': 0.86; 'sometime': 0.91; 'trick': 0.91;
 'viewed': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1710551194; x=1711155994; darn=python.org;
 h=thread-index:content-language:content-transfer-encoding
 :mime-version:message-id:date:subject:in-reply-to:references:to:from
 :from:to:cc:subject:date:message-id:reply-to;
 bh=W/A4PpBCba++NmUFpVGoP87UJbnA99/dDMX7m0eJ5pY=;
 b=lQoczvN4xen90ZyzVk+UQDwZNbGnXD3Khze4rP2vPBoChQbrCdKA7sAor8NAfyYrzq
 ttJkDAQkx0nFrtKAjxzbMXBUH5+MS0B8H+dBdlEBDdI9xJH5AFF89vtADwGEDQz0kAQU
 jhKewPuizUc8vjdBuJ9/uRmzFUG3HDZqb2aUwYjGU8MkLp+DVisK0cN1An+iAsfhG+Bz
 VuBUqUowszW8eXT7B/nU8j2i8B+034ErL1APlRp74KE1iH7ZnIIEwOKvNjqC0nxsfB1h
 4/SdSQomZqYJh+OFvGOXu+P9ajVegSJz4atjo1WOj43tGGmYa41vsPrEYC/Mm/E38/Ao
 t9dg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1710551194; x=1711155994;
 h=thread-index:content-language:content-transfer-encoding
 :mime-version:message-id:date:subject:in-reply-to:references:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=W/A4PpBCba++NmUFpVGoP87UJbnA99/dDMX7m0eJ5pY=;
 b=Omz6djVrlhXeWtvLOE9qSUGiCC3cRJfXzLIta4bi09LlmAv0QZEDpNspfcIoIi2oXk
 PhTiOpCW/aBZnNpZVE4hLqcD++oxVOFBT080/pNc9lRhDNRL9XSUbLU77x5MDtnv21sL
 BT+W5OswFVf2jV3K9fr5HhMweTImUf0CtAw24EGph1BTPX4+wnVgR5lfwiS7bCm0JxMk
 bPlNk0s+yc6286HcH52KwAD4kScR4xDbkn45uaJQY1UGZsoD+z2MkCo2zFgy+GiBt234
 FlGV+rwxtviklvfYFDFUZiPPVsuDCix2sd7SRWA5fcBslXaMMNQeydWGOhy1mtw8EJO9
 5L6Q==
X-Forwarded-Encrypted: i=1;
 AJvYcCX3rAHuFmMdCj8J23HVgn3uxti72BZlVy+vFsezqVEHaldlnddWHy6BCFNL2RE+d8saLwNOPeBce741e6B5h2Mom7FTgUuX
X-Gm-Message-State: AOJu0Yzk+swXjv4qwKeylwLVGd8yHMVPS9d4VYz0xn2xozKZYOLbkIx4
 dRsWB90AwPyVZzDWXbKVHxLM3tRzkeKYbQ/LiUnQDetC5+9ZSwruBKO+X1qX
X-Google-Smtp-Source: AGHT+IECVtVceVZ4ltEsSUqcSdiGI1ELGKYP1nwFyQlXL3yAXgrq/isguwvpudCIcr9ats+LFH2GRQ==
X-Received: by 2002:a25:b2a2:0:b0:dc6:dc58:8785 with SMTP id
 k34-20020a25b2a2000000b00dc6dc588785mr3844378ybj.62.1710551194140; 
 Fri, 15 Mar 2024 18:06:34 -0700 (PDT)
In-Reply-To: <ZfS-lbUP1bY04LNI@anomaly>
X-Mailer: Microsoft Outlook 16.0
Content-Language: en-us
Thread-Index: AQGbUsfGY+YVTHPodJtuAaQrJD0tlwFwPc2SAXG/5usDGuqK/gC9BPJisYIHXlA=
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
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: <003301da773e$2f54b850$8dfe28f0$@gmail.com>
X-Mailman-Original-References: <87y1ajdeqs.fsf@zedat.fu-berlin.de>
 <3cbc94a7-bf8e-4ee7-ae70-ba8b73ec61bd@tompassin.net>
 <4TxDMW3Dn1znVFX@mail.python.org>
 <b169e599-e81f-45ce-8e2a-7027b59a4627@tompassin.net>
 <ZfS-lbUP1bY04LNI@anomaly>
Bytes: 7944

A part of the Python view of the world is about a concept of whether
something is "truthy" or not and thus many corners of the language do not
care what kind of object an expression returns. If the object is returned in
a context looking for not a Boolean value but a truth value, it is evaluated
and in other scenarios, left alone to propagate in the code.

Changing such behavior would be a very serious undertaking, and frankly,
silly. 

But if anyone really wants an actual Boolean, then the non-not operator
should do the trick as !(whatever) takes what follows as a truthy value and
negates it and a second ! brings it back as a True/False as in !!(whatever)

And for many data types, perhaps all, you can use the bool() function that I
believe follows the same rules about being truthy.

Both of the above should be fairly easy to use in any rare contexts that
demand a more standard Boolean result as in some other languages.

It is one of many strengths of python that supports varieties of
polymorphism. And it allows a value to be passed or returned that can both
be viewed as some kind of object of many kinds and seen as a Boolean for
considerations like flow of control.

-----Original Message-----
From: Python-list <python-list-bounces+avi.e.gross=gmail.com@python.org> On
Behalf Of Dan Sommers via Python-list
Sent: Friday, March 15, 2024 5:33 PM
To: python-list@python.org
Subject: Re: Configuring an object via a dictionary

On 2024-03-15 at 15:48:17 -0400,
Thomas Passin via Python-list <python-list@python.org> wrote:

> [...] And I suppose there is always the possibility that sometime in
> the future an "or" clause like that will be changed to return a
> Boolean, which one would expect anyway.

Not only is the current value is way more useful, but changing it would
be a compatibility and maintenance nightmare.

If I want Java, I know where to find it.  :-)
-- 
https://mail.python.org/mailman/listinfo/python-list