Commit 23b21e3264d55923d2a88858fab02c865f5cee4c
1 parent
5d43a1a9
Replace has_key() by "in" in generate_prod3_irfs.py script
Showing
1 changed file
with
7 additions
and
7 deletions
examples/generate_prod3_irfs.py
| ... | ... | @@ -69,31 +69,31 @@ if __name__ == '__main__': |
| 69 | 69 | for entry in entries: |
| 70 | 70 | |
| 71 | 71 | # Set optional attributes |
| 72 | - if entry.has_key('rebin'): | |
| 72 | + if 'rebin' in entry: | |
| 73 | 73 | rebin = entry['rebin'] |
| 74 | 74 | else: |
| 75 | 75 | rebin = False |
| 76 | - if entry.has_key('eascale'): | |
| 76 | + if 'eascale' in entry: | |
| 77 | 77 | eascale = entry['eascale'] |
| 78 | 78 | else: |
| 79 | 79 | eascale = 1.0 |
| 80 | - if entry.has_key('bgdscale'): | |
| 80 | + if 'bgdscale' in entry: | |
| 81 | 81 | bgdscale = entry['bgdscale'] |
| 82 | 82 | else: |
| 83 | 83 | bgdscale = 1.0 |
| 84 | - if entry.has_key('bgdethres'): | |
| 84 | + if 'bgdethres' in entry: | |
| 85 | 85 | bgdethres = entry['bgdethres'] |
| 86 | 86 | else: |
| 87 | 87 | bgdethres = 1000.0 |
| 88 | - if entry.has_key('bgdinfill'): | |
| 88 | + if 'bgdinfill' in entry: | |
| 89 | 89 | bgdinfill = entry['bgdinfill'] |
| 90 | 90 | else: |
| 91 | 91 | bgdinfill = False |
| 92 | - if entry.has_key('oversample'): | |
| 92 | + if 'oversample' in entry: | |
| 93 | 93 | oversample = entry['oversample'] |
| 94 | 94 | else: |
| 95 | 95 | oversample = 1 |
| 96 | - if entry.has_key('norm1d'): | |
| 96 | + if 'norm1d' in entry: | |
| 97 | 97 | norm1d = entry['norm1d'] |
| 98 | 98 | else: |
| 99 | 99 | norm1d = False | ... | ... |