Initializing a list with copies

Alex Martelli aleax at aleax.it
Tue Apr 30 17:08:59 EDT 2002


Steve Holden wrote:
        ...
> sloppiness. And, of course, to confound the confusion int() is *not* a
> call to the integer class/type creator, but a no-argument call of the
> built-in int() function. What happens to "int(x[, radix]) " when int is a
> built-in type, by the way, or isn't that going to happen?

Steve, what are you _taking_ about...?

>>> type(int)
<type 'type'>
>>> int('23',6)
15

int *is* a built-in type, a call to it is a call to the int type, and one of
the ways you can call the int type to create an int istance is with a
string argument and optionally a radix integer argument.

Are you stuck in the far, dark ages of Python 2.1 ... ?-)


> so-they-don't-call-it-a-callable-iterator-because-
>         -it's-an-iterator-that's-callable-they-call-it-a-
>         -callable-iterator-because-it-iterates-callables-
>         -ly y'rs  - steve

Bingo.


Alex




More information about the Python-list mailing list