On Wed, 5 Aug 2020 at 20:10, Ethan Furman <et...@stoneleaf.us> wrote:
>      --> from aenum import Constant
>
>      --> class K(Constant):
>      ...   a = 5
>      ...

This is exactly what I intended. Think if you're able to do:


from aenum import const
@const a = 5


Notice that I'm using the "at" char because I can't find a better character.

I give the rest to your imagination:


# previous declarations of x in the same scope are a SyntaxError
@var x = None

# simulate electrical circuit
c = a @nand b

# Java style
@final class A:
    @protected _x = 0

# ...maybe someday
@int a = 1
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/KRJSKUZQF5JWK7QA2TNLFQTONUS6FC5R/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to