Vedran Čačić added the comment:

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.:)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26988>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to