comparison MoinMoin/macro/WantedPages.py @ 551:17ab8fe4a94b

refactored some d.has_key(k) to k in d (faster) imported from: moin--main--1.5--patch-555
author Thomas Waldmann <tw@waldmann-edv.de>
date Tue, 11 Apr 2006 09:59:11 +0000
parents 2202f548cbb0
children 0152984f76ee
comparison
equal deleted inserted replaced
550:24c87a2cd368 551:17ab8fe4a94b
43 continue 43 continue
44 44
45 # Add links to pages which does not exists in pages dict 45 # Add links to pages which does not exists in pages dict
46 links = page.getPageLinks(request) 46 links = page.getPageLinks(request)
47 for link in links: 47 for link in links:
48 if not pages.has_key(link): 48 if not link in pages:
49 if wanted.has_key(link): 49 if link in wanted:
50 wanted[link][name] = 1 50 wanted[link][name] = 1
51 else: 51 else:
52 wanted[link] = {name: 1} 52 wanted[link] = {name: 1}
53 53
54 # Check for the extreme case when there are no wanted pages 54 # Check for the extreme case when there are no wanted pages