This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author veky
Recipients David Hagen, John Hagen, abarry, barry, eli.bendersky, ethan.furman, kennethreitz, python-dev, rhettinger, veky, vstinner
Date 2016-08-19.09:12:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471597937.35.0.853166396139.issue26988@psf.upfronthosting.co.za>
In-reply-to
Content
I must say I never understood how exactly is assigning a constant better in this regard. To me, after

    a = SOMETHING
    b = SOMETHING

a and b should be the same, right? _Especially_ when SOMETHING is None or (), but also when it's some bare identifier like AUTO_ENUM.

Mental models are already broken. We are already "lying" according to semantics of type metaclass. There is no reason then to have to sprinkle some magic dust over our code, just so it looks like an assignment is the most important thing here, when it really isn't.

Either we should embrace Python's power in full and communicate to users that there's something weird going on, or we shouldn't have AutoEnum. To me, `green = None` is in no way better, in fact it seems more dishonest, than simply `green`. Again, _if_ we communicate (e.g. via style='declarative') that the semantics is not ordinary. (Alternatively, we might just write `green = uuid4()` and be done with it.:)
History
Date User Action Args
2016-08-19 09:12:17vekysetrecipients: + veky, barry, rhettinger, vstinner, eli.bendersky, ethan.furman, python-dev, abarry, John Hagen, David Hagen, kennethreitz
2016-08-19 09:12:17vekysetmessageid: <1471597937.35.0.853166396139.issue26988@psf.upfronthosting.co.za>
2016-08-19 09:12:17vekylinkissue26988 messages
2016-08-19 09:12:16vekycreate