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.
- [web2py] Re: Mobile detector Ross Peoples
- Re: [web2py] Re: Mobile detector Angelo Compagnucci
- Re: [web2py] Re: Mobile detector Ross Peoples
- Re: [web2py] Re: Mobile detector Angelo Compagnucci
- Re: [web2py] Re: Mobile detector Anthony
- Re: [web2py] Re: Mobile detector Angelo Compagnucci
- Re: [web2py] Re: Mobile detector Ross Peoples
- Re: [web2py] Re: Mobile detector Ross Peoples
- Re: [web2py] Re: Mobile dete... Angelo Compagnucci
- Re: [web2py] Re: Mobile ... Angelo Compagnucci
- Re: [web2py] Re: Mobile ... Ross Peoples
- Re: [web2py] Re: Mobile ... Angelo Compagnucci
- Re: [web2py] Re: Mobile ... Ross Peoples
- [web2py] Re: Mobile dete... Massimo Di Pierro
- Re: [web2py] Re: Mobile ... Angelo Compagnucci
- [web2py] Re: Mobile dete... Massimo Di Pierro
- Re: [web2py] Re: Mobile ... Martin Weissenboeck
- Re: [web2py] Re: Mobile ... Angelo Compagnucci
- Re: [web2py] Re: Mobile ... Martin Weissenboeck
- Re: [web2py] Re: Mobile ... Angelo Compagnucci
- Re: [web2py] Re: Mobile ... Bruno Rocha

