Opened 7 years ago
Closed 6 years ago
#29382 closed Uncategorized (duplicate)
don't call objects with __call__ instantly
Reported by: | alex | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 1.11 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Some objects are callable but have sub-attributes.
In my case the wtforms Label object.
I cannot access Label.text because Label is callable and the resulting str object has not the attribute text.
Please evaluate first the object fully and then check if object is callable. Elsewise the behaviour is inconsistent and confusing.
Sorry for the changes
Change History (5)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:2 by , 7 years ago
Description: | modified (diff) |
---|
comment:3 by , 7 years ago
Description: | modified (diff) |
---|
comment:4 by , 7 years ago
comment:5 by , 6 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Is it related to or a duplicate of #29306 and/or #15791. It's not clear to me exactly how your proposal would work and if it would be backwards compatible.