Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for December 5, 2013
Deadline scheduling: coming soon?
LWN.net Weekly Edition for November 27, 2013
ACPI for ARM?
LWN.net Weekly Edition for November 21, 2013
Is there now a __past__ module in Python 3 that I missed?
An "enum" for Python 3
Posted May 22, 2013 20:03 UTC (Wed) by jake (editor, #205)
Heh, no, sorry. I did my testing on Python 2.7 using the flufl.enum package that was used to prototype some of the ideas from the PEP. It's hard retraining my fingers (let alone my brain) on things like print.
print(Color.green == 2)
is that better?
Posted May 22, 2013 21:02 UTC (Wed) by mathstuf (subscriber, #69389)
> It's hard retraining my fingers (let alone my brain) on things like print.
I've gotten into the habit of using print as a "function" all the time since expressions in parentheses without commas is a no-op (you lose redirection support in both, that's usually fixed with output.write()).
Posted May 24, 2013 7:46 UTC (Fri) by mgedmin (subscriber, #34497)
All my blank lines became
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds