diff --git a/laydi/annotations.py b/laydi/annotations.py index 721e210..12be307 100644 --- a/laydi/annotations.py +++ b/laydi/annotations.py @@ -18,10 +18,7 @@ def set_dim_handler(dimname, handler): def get_dim_handler(dimname): """Get the handler for the given dimension.""" global _dim_annotation_handlers - if _dim_annotation_handlers.has_key(dimname): - return _dim_annotation_handlers[dimname] - else: - return None + return _dim_annotation_handlers.get(dimname, None) class AnnotationHandler: