-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve lazy support #1207
Comments
Nice! Wouldn't it be easier to just accept a supplier function (i.e. |
I think that's very strange behavior for "formatting" |
If anything, it already exists as an external library like I agree it's more powerful than the current |
it only support old style percent formatting, not new style from lazy_string import LazyString
from loguru import logger
def make_foo() -> int:
return 1
logger.info("nice, {:05d}".format(LazyString(make_foo)))
|
since we are using new style format, it's possible to control how value are formatted with
__format__
current
lazy
option is not necessary, we can add aLazyValue
type, this make is possible to mix lazy and un-lazy argumentsThe text was updated successfully, but these errors were encountered: