Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Jussi Piitulainen Newsgroups: comp.lang.python Subject: Re: Suggestion: make sequence and map interfaces more similar Date: Wed, 30 Mar 2016 14:21:43 +0300 Organization: A noiseless patient Spider Lines: 22 Message-ID: References: <56FA8C71.4050306@rece.vub.ac.be> <56fb677f$0$11121$c3e8da3@news.astraweb.com> <56fba7d3$0$1616$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="305c68510616a2e7ac08bcd2ff1598bd"; logging-data="2690"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5nGLsUSgaPrhyPpJ0PvkW/+F71oL7naA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:xtLQeXf1fg+cGCn90s6VUdYCRwo= sha1:qm9Y4ZE4kPzbGJePL0YpQU5NKmw= Xref: csiph.com comp.lang.python:106051 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.