A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/020885.html below:

[Python-Dev] Boolean transition

[Python-Dev] Boolean transition [Python-Dev] Boolean transitionBrian Quinlan brian@sweetapp.com
Sun, 10 Mar 2002 12:46:09 -0800
[Bunch of arguments combined - and then snipped :-)]

For people who want to do integer arithmetic using Booleans, would
calling the int() built-in be too much of a burden?

Samuele's example would be written as:

def count_visible(win_list):
  c = 0
  for win in win_list:
     c+= int(win.visible)
  return c

That actually seems clearer to me and it fits with Pythons strongly
typed nature. 

Of course there is still the issue of staging any change like this into
the language.

Cheers,
Brian




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4