We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0659af commit 38caaabCopy full SHA for 38caaab
1 file changed
nameof/nameof.py
@@ -1,9 +1,9 @@
1
import inspect
2
import ast
3
-from typing import Any
+from typing import Any, Union
4
import os
5
6
-def nameof(var: Any, wrap_in_chars: str = "", replace_with_whitespace: str | list[str] = [] ) -> str:
+def nameof(var: Any, wrap_in_chars: str = "", replace_with_whitespace: Union[str, list[str]] = [] ) -> str:
7
"""
8
Returns the name of the variable or attribute passed as the first argument.
9
0 commit comments