Well, the reason is_mobile is in the base object is for polymorphism to 
work. If we later did do a WindowsMobile(Dist): class, we can easily set 
is_mobile = True in it, since Dist is a subclass of the DetectorBase. I just 
left is_mobile attached to the response even if it's not mobile because it 
makes it easier to test. Someone may test by trying if ua.is_mobile == 
False. So if is_mobile doesn't exist, it equals None and the test will fail. 
The routine runs pretty quickly. The thing that takes the longest is string 
searching. 

Reply via email to