On 29.09.2010, at 21:14, Alexander Bruy wrote: > 2. Some servers don't have optional capabilities entries (e.g. > provider.contact.position). How I can handle this situation? > Now I create if statement for each entry: > > if provider.contact is None: > pass > else: > # do something
if provider.contact is not None: do something or if provider.contact: do something The first will do something even if contact is an empty string. Regards, Oliver _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
