@@ -96,7 +96,7 @@ def local_field_data(label):
9696 ans += 'Ramification index $e$: %s<br>' % str (f ['e' ])
9797 ans += 'Residue field degree $f$: %s<br>' % str (f ['f' ])
9898 ans += 'Discriminant ideal: $(p^{%s})$ <br>' % str (f ['c' ])
99- if 'galois_label' in f :
99+ if f . get ( 'galois_label' ) :
100100 gt = int (f ['galois_label' ].split ('T' )[1 ])
101101 ans += 'Galois group $G$: %s<br>' % group_pretty_and_nTj (gn , gt , True )
102102 else :
@@ -417,7 +417,7 @@ def render_field_webpage(args):
417417 cc = data ['c' ]
418418 gn = data ['n' ]
419419 autstring = r'\Aut'
420- if 'galois_label' in data :
420+ if data . get ( 'galois_label' ) :
421421 gt = int (data ['galois_label' ].split ('T' )[1 ])
422422 the_gal = WebGaloisGroup .from_nt (gn ,gt )
423423 isgal = ' Galois' if the_gal .order () == gn else ' not Galois'
@@ -432,7 +432,7 @@ def render_field_webpage(args):
432432 ('e' , r'\(%s\)' % e ),
433433 ('f' , r'\(%s\)' % f ),
434434 ('c' , r'\(%s\)' % cc ),
435- ('Galois group' , group_pretty_and_nTj (gn , gt ) if 'galois_label' in data else 'not computed' ),
435+ ('Galois group' , group_pretty_and_nTj (gn , gt ) if data . get ( 'galois_label' ) else 'not computed' ),
436436 ]
437437 # Look up the unram poly so we can link to it
438438 unramdata = db .lf_fields .lucky ({'p' : p , 'n' : f , 'c' : 0 })
@@ -472,7 +472,7 @@ def render_field_webpage(args):
472472 else :
473473 gsm = lf_formatfield (',' .join (str (b ) for b in gsm ))
474474
475- if 'wild_gap' in data and data ['wild_gap' ] != [0 ,0 ]:
475+ if data . get ( 'wild_gap' ) and data ['wild_gap' ] != [0 ,0 ]:
476476 wild_inertia = abstract_group_display_knowl (f"{ data ['wild_gap' ][0 ]} .{ data ['wild_gap' ][1 ]} " )
477477 else :
478478 wild_inertia = 'Not computed'
@@ -503,20 +503,20 @@ def render_field_webpage(args):
503503 'aut' : data ['aut' ],
504504 })
505505 friends = []
506- if 'slopes' in data :
506+ if data . get ( 'slopes' ) :
507507 info .update ({'slopes' : show_slopes (data ['slopes' ])})
508- if 'inertia' in data :
508+ if data . get ( 'inertia' ) :
509509 info .update ({'inertia' : group_display_inertia (data ['inertia' ])})
510510 for k in ['gms' , 't' , 'u' ]:
511- if k in data :
511+ if data . get ( k ) :
512512 info .update ({k : data [k ]})
513- if 'ram_poly_vert' in data :
513+ if data . get ( 'ram_poly_vert' ) :
514514 info .update ({'ram_polygon_plot' : plot_polygon (data ['ram_poly_vert' ], data ['residual_polynomials' ], data ['ind_of_insep' ], p )})
515- if 'residual_polynomials' in data :
515+ if data . get ( 'residual_polynomials' ) :
516516 info .update ({'residual_polynomials' : "," .join (f"${ teXify_pol (poly )} $" for poly in data ['residual_polynomials' ])})
517- if 'associated_inertia' in data :
517+ if data . get ( 'associated_inertia' ) :
518518 info .update ({'associated_inertia' : "," .join (f"${ ai } $" for ai in data ['associated_inertia' ])})
519- if 'galois_label' in data :
519+ if data . get ( 'galois_label' ) :
520520 info .update ({'gal' : group_pretty_and_nTj (gn , gt , True ),
521521 'galphrase' : galphrase ,
522522 'gt' : gt })
0 commit comments