Since Python has built-in syntax for interpolated strings, I believe it's a good area to idea to extend it to pattern matching, like so:
def unquote(string: str) -> str: match string: case f'"{value}"': return value case f"'{value}'": return value case _: return string Doing this with current match syntax is not as easy. I have other reasons to consider this idea as well, but before I try to pursue this, I'd like to know if something like this was already discussed when the proposal was being made? _______________________________________________ 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/4D2CRUSACUYK2VNYHULBUQ525QAF7XDV/ Code of Conduct: http://python.org/psf/codeofconduct/