Hi Ross, I have explained myself too convoluted!
You are right on is_mobile and polymorphism, I read too approximatively the code. You are right also on attch always the is_mobile True/False to the result object, is more simple to test for true false than that if exists or not. I hope it will be included as soon as possible! Thank you! 2011/8/24 Ross Peoples <ross.peop...@gmail.com>: > 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.