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
an
On 3/15/2024 5:33 PM, Dan Sommers via Python-list wrote:
On 2024-03-15 at 15:48:17 -0400,
Thomas Passin via Python-list 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 an
On 15/03/24 22:30, Loris Bennett via Python-list wrote:
Hi,
I am initialising an object via the following:
def __init__(self, config):
self.connection = None
self.source_name = config['source_name']
self.server_host = config['server_host']
self.server_
On 2024-03-15 at 15:48:17 -0400,
Thomas Passin via Python-list 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 usefu
On 3/15/2024 3:09 PM, Grant Edwards via Python-list wrote:
On 2024-03-15, Thomas Passin via Python-list wrote:
On 3/15/2024 5:30 AM, Loris Bennett via Python-list wrote:
Hi,
I am initialising an object via the following:
def __init__(self, config):
self.connection = None
On 2024-03-15, Thomas Passin via Python-list wrote:
> On 3/15/2024 5:30 AM, Loris Bennett via Python-list wrote:
>> Hi,
>>
>> I am initialising an object via the following:
>>
>> def __init__(self, config):
>>
>> self.connection = None
>>
>> self.source_name = config['so
On 3/15/2024 5:30 AM, Loris Bennett via Python-list wrote:
Hi,
I am initialising an object via the following:
def __init__(self, config):
self.connection = None
self.source_name = config['source_name']
self.server_host = config['server_host']
self.serv
On 3/15/24 03:30, Loris Bennett via Python-list wrote:
Hi,
I am initialising an object via the following:
self.source_name = config['source_name']
config.get('source_name', default_if_not_defined) is a common technique...
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I am initialising an object via the following:
def __init__(self, config):
self.connection = None
self.source_name = config['source_name']
self.server_host = config['server_host']
self.server_port = config['server_port']
self.user_base = config['u