Implicit conversion to boolean in if and while statements

Chris Angelico rosuav at gmail.com
Mon Feb 11 13:50:03 CET 2013


On Mon, Feb 11, 2013 at 11:28 PM, Rick Johnson
<rantingrickjohnson at gmail.com> wrote:
> On Saturday, February 9, 2013 11:04:42 PM UTC-6, Chris Angelico wrote:
>> On Sun, Feb 10, 2013 at 3:54 PM, Rick Johnson wrote:
>> > Well Chris i have wonderful news for you! Python /does/
>> > have "homogenous arrays", and they're called, wait for
>> > it......... arrays!
>
>> That's not a built-in. But you were the one who complained about the
>> way sum() could be applied to a list that contains a non-integer;
>> maybe your solution is simply to ignore sum() and work with
>> array.array?
>
> Yes i could, however by doing so i would be ignoring the inconsistent elephant in the room. My crusade is to bring consistency and logic to languages, and if i have any free time afterwards, to remove multiplicity. There are two types of people in the world Chris, those that lead and those that follow.

In other words, you prefer to argue than to code.

>> Nice how you can complain about Python for not having something, then
>> heap scorn on me for not being aware that it's there in the stdlib.
>> (Which, by the way, I freely admit to being less than fully familiar
>> with. Even less familiar with what's on PyPI.)
>
> Well i would expect anyone who considers himself a python programmer (not to mention "pythonista"!) to at minimum be familiar with the stdlib. That does not mean he must have attained black belt level kung-fu in /every/ stdlib module, but he must at least /know/ all the modules names and all types that Python offers. Is that really too much to ask Chris?

Actually, it is. How many modules and types does Python offer? Can you
tell me, without looking it up? Okay. Now how many does Ruby offer?
Presumably you extend the same courtesy to other languages. Now
imagine someone who knows twenty languages. Will s/he know their
entire stdlibs?

If there is anyone here who can honestly boast knowing the ENTIRE
stdlib of a language the size of Python, I would be impressed. Very
impressed.

ChrisA



More information about the Python-list mailing list