﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28358	LazyObject defines attribute that don't exist on wrapped object	Andrey Fedoseev	Theofilos Alexiou	"`LazyObject` defines magic methods (`__getitem__`, `__iter__`) which may be missing from the wrapped object. This leads to the following errors:

{{{#!python
some_variable = request.user

if hasattr(some_variable, ""__getitem__""):
    foo = some_variable[""foo""]  # raises TypeError: 'User' object has no attribute '__getitem__'

if hasattr(some_variable, ""__iter__""):
    for item in some_variable:  # raises TypeError: 'User' object is not iterable
}}}"	Bug	closed	Utilities	1.11	Normal	fixed		Collin Anderson	Ready for checkin	1	0	0	0	0	0
