per
In the _cached function
In the expensive function
(3, 2, 3)
It's not necessarily better than your version though. :D
Kind regards,
Heinrich Kruger
--
https://mail.python.org/mailman/listinfo/python-list
u can do something like:
```
from . import __version__
def main():
print(f"Version: {__version__}")
```
Bear in mind that this would only work if your package is installed (e.g. in
virtual environment). Otherwise the `metadata.version(__name__)` call will fail
with a `importlib.met
ormal string, where
> the {} don't have a special meaning.
What the OP was trying to do is valid in python 3.8 (see
https://docs.python.org/3/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging)
but not in older versions. To achieve the same result in py
For example:
resp = requests.get('https://example.com/api/data')
data = resp.json()
requests.post('https://example.com/api/other_data', json=data)
See
https://2.python-requests.org/en/stable/user/quickstart/#more-complicated-post-requests
for more detail.
--
Heinrich Kruger
--
https://mail.python.org/mailman/listinfo/python-list