#34445: DateField.input_formats cannot be printed
-------------------------------+--------------------------------------
Reporter: stefan6419846 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by David Sanders):
Hi, thanks for the report!
Interesting:
{{{
> lazy_val = lazy(get_format, str, list, tuple)("DATE_INPUT_FORMATS")
> lazy_val.__str__()
['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y',
'%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
> str(lazy_val)
*** TypeError: __str__ returned non-string (type list)
}}}
The `__str__()` on the proxy object doesn't seem to be called when
evaluated through `str()` 🤔
--
Ticket URL: <https://code.djangoproject.com/ticket/34445#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701872cc40efb-3df3d8ab-b9df-4669-8ac2-b61fa34603e8-000000%40eu-central-1.amazonses.com.