Author veky
Recipients barry, eli.bendersky, ethan.furman, ezio.melotti, python-dev, r.david.murray, rhettinger, serhiy.storchaka, veky
Date 2016-09-13.22:09:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473804548.76.0.505006631564.issue23591@psf.upfronthosting.co.za>
In-reply-to
Content
About drama: I don't know how to approach the problem. I tell you about various concerns of mine, you seem to agree, and still you do exactly what I was warning you about. It could be that you just consider me a boring nag, but then saying so would be more useful than this situation.

---

Yes, you solved some problems I did have, and it's great, but still many of them remain. This thing is inherently complicated. You are trying to construct a discrete Boolean algebra, but without any guarantee of atoms. Imagine if the language was different:

    class MySets(DiscreteSets):
        a = {0, 1}
        b = {2}
        c = {1, 2}

You'd naturally view {0}, {1} and {2} as atoms, of different "sort" than {0,1} and such. That's what's missing here: a clear distinction between atoms and "molecules". It could be that the intended usage is for atoms to _always_ be constructed with auto(), and for molecules to be constructed from previous atoms, but then the documentation ought to say so.

So far, the only thing you say is "then it is on them to do it correctly", but you never really tell what "correctly" means. I understand your desire not to hard forbid anything, but the docs should tell how your class is _intended_ to be used, _AND_ the class should make every reasonable effort to preserve what it can of its behavior even in the face of not-quite-intended usage. Look at Raymond's collections.Counter's treatment of non-integer values for example.

BTW I'm not aware of any stdlib object whose repr raises ValueError. It surely makes debugging a lot harder.
History
Date User Action Args
2016-09-13 22:09:08vekysetrecipients: + veky, barry, rhettinger, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, python-dev, serhiy.storchaka
2016-09-13 22:09:08vekysetmessageid: <1473804548.76.0.505006631564.issue23591@psf.upfronthosting.co.za>
2016-09-13 22:09:08vekylinkissue23591 messages
2016-09-13 22:09:08vekycreate