Eric V. Smith <[email protected]> added the comment:
> log_dir = Path('logs/{date}')
> log_file = Path(str(path).format(time.strftime('%Y-%m-%d')) / 'log.txt'
(I think you're missing "date=" in the call to .format().)
Could you show what you think this would look like if Path.__format__ existed?
I don't think anyone's suggesting that path.format() would be added by this
issue, but maybe that would be a reasonable proposal as a different issue.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38222>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com