Changed conditionals for cell region to be more Pythonic per comments by @paulromano

This commit is contained in:
Will Boyd 2015-11-16 08:06:43 -05:00
parent 2c19aaae74
commit c38fcdc073

View file

@ -486,7 +486,7 @@ def get_opencg_cell(openmc_cell):
# works if the region is a single half-space or an intersection of
# half-spaces, i.e., no complex cells.
region = openmc_cell.region
if region != None:
if region is not None:
if isinstance(region, Halfspace):
surface = region.surface
halfspace = -1 if region.side == '-' else 1