[Python-Dev] Purpose of Doctests [Was: Best practices for Enum] (original) (raw)
Glenn Linderman v+python at g.nevcal.com
Tue May 21 01:10:20 CEST 2013
- Previous message: [Python-Dev] Purpose of Doctests [Was: Best practices for Enum]
- Next message: [Python-Dev] Purpose of Doctests [Was: Best practices for Enum]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 5/19/2013 9:08 PM, Ethan Furman wrote:
On 05/19/2013 05:24 PM, Nick Coghlan wrote:
This is the point I was trying to make: once you use IntEnum (as you would in any case where you need bitwise operators), Enum gets out of the way for everything other than str, repr, and one other slot (that escapes me for the moment...). getnewargs_ and _new But if you do math, the result is no longer an Enum of any type.
And thus completely loses the debugging benefits of having a nice repr. IntEnum isn't useful for bitfields. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130520/eb15e407/attachment-0001.html>
- Previous message: [Python-Dev] Purpose of Doctests [Was: Best practices for Enum]
- Next message: [Python-Dev] Purpose of Doctests [Was: Best practices for Enum]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]