Is it possible to use self-documenting f-strings in python 3.7?

Viewed 58

As of version 3.8 python offers the possibility of using what is called self-documenting f-strings:

user = 'eric_idle'
member_since = date(1975, 7, 31)
f'{user=} {member_since=}'
"user='eric_idle' member_since=datetime.date(1975, 7, 31)"

My question here is simple: is it possible to import this from future and use it in python 3.7?

1 Answers

Unfortunately, a language feature like this is unlikely to be supported in previous versions.

Furthermore, it isn't mentioned on __future__'s docs.

Related