[Python-Dev] Documenting enum types (original) (raw)

Guido van Rossum guido at python.org
Thu Aug 14 17:42:00 CEST 2014


The enemy must be documented and exported, since users will encounter them. On Aug 14, 2014 4:54 AM, "Nick Coghlan" <ncoghlan at gmail.com> wrote:

On 14 August 2014 19:25, Victor Stinner <victor.stinner at gmail.com> wrote: > Hi, > > IMO we should not document enum types because Python implementations other > than CPython may want to implement them differently (ex: not all Python > implementations have an enum module currently). By experience, exposing too > many things in the public API becomes a problem later when you want to > modify the code.

Implementations claiming conformance with Python 3.4 will have to have an enum module - there just aren't any of those other than CPython at this point (I expect PyPy3 will catch up before too long, since the changes between 3.2 and 3.4 shouldn't be too dramatic from an implementation perspective). In this particular case, though, I think the relevant question is "Why are they enums?" and the answer is "for the better representations". I'm not clear on the use case for exposing and documenting the enum types themselves (although I don't have any real objection either). Regards, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia


Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20140814/bac3784d/attachment.html>



More information about the Python-Dev mailing list