Suggestion: make sequence and map interfaces more similar
Jussi Piitulainen
jussi.piitulainen at helsinki.fi
Wed Mar 30 07:21:43 EDT 2016
Manolo MartÃnez writes:
> On 03/30/16 at 01:40pm, Jussi Piitulainen wrote:
>> Manolo MartÃnez writes:
> >
>> > I think it's with your definition of surjection. Bijections are
>> > surjective, no?
>>
>> Yes, and most many-to-one mappings are *not* surjective.
>
> Well, I don't know about most, there are uncountably many surjective
> and non-surjective many-to-one mappings :)
Ok, safer to say that some many-to-one mappings are not surjective.
I was thinking of finite sets, and not even really thinking. But even
with infinite domain and infinite codomain, there can be uncountably
many mappings without any of them being a surjection - just have the
codomain be a larger infinity.
It depends on the types. Which makes the concept not easily applicable
to Python data structures as such.
More information about the Python-list
mailing list