From bbfcee4fffc553b5dd08f37a79dd6ccddbf340f8 Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Thu, 8 Dec 2022 16:32:52 +0100 Subject: uri and some utils --- bsfs/utils/commons.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 bsfs/utils/commons.py (limited to 'bsfs/utils/commons.py') diff --git a/bsfs/utils/commons.py b/bsfs/utils/commons.py new file mode 100644 index 0000000..bad2fe0 --- /dev/null +++ b/bsfs/utils/commons.py @@ -0,0 +1,23 @@ +""" + +Part of the BlackStar filesystem (bsfs) module. +A copy of the license is provided with the project. +Author: Matthias Baumgartner, 2022 +""" +# imports +import typing + +# exports +__all__: typing.Sequence[str] = ( + 'typename', + ) + + +## code ## + +def typename(obj) -> str: + """Return the type name of *obj*.""" + return type(obj).__name__ + + +## EOF ## -- cgit v1.2.3