Suggestion: make sequence and map interfaces more similar

Marko Rauhamaa marko at pacujo.net
Wed Mar 30 08:55:06 EDT 2016


Manolo Martínez <manolo at austrohungaro.com>:

> On 03/30/16 at 02:44pm, Marko Rauhamaa wrote:
>> I don't even know if you can say much about the cardinality (or
>> countability) of mappings. The general set of mappings can't exist.
>> The *class* of mappings does exist in some set theories, but I don't
>> believe classes have cardinality.
>
> I guess I was thinking of the cardinality of the set of tuples with
> members of the domain in the first member and their image in the
> second.

If you fix the domain and codomain, then we can discuss cardinality
again, but the answer depends on the domain and codomain. For example,
if the domain is the empty set, there exists precisely one function. And
if the codomain is the empty set as well, that function is a bijection.


Marko



More information about the Python-list mailing list