On Thu, May 23, 2019 at 06:23:31PM +0200, Yanghao Hua wrote:
> Is this (<== and ==>) something can be made into CPython?
If it goes into CPython, eventually every other Python needs to do the
same.
Of course it *could* be put into Python, but you haven't given
sufficient justification for why it *should* be put into Python.
Why does your DSL need a seperate assignment operator? How is it
different from regular assignment?
Could you use __setitem__ instead?
Instead of this:
variable <== thing # magic happens here
can you write this?
obj.variable = thing # magic happens here
If your DSL is so different from Python that it needs new operators,
perhaps you should write an interpreter for your language and run that
seperately.
code = """
any syntax you like <- thing
"""
result = interpret(code)
--
Steven
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/