Skip to content

Commit 7e5617d

Browse files
author
Ram Rachum
committed
-
1 parent 1e42ec1 commit 7e5617d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

garlicsim/garlicsim/general_misc/function_anchoring_type.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@ def __new__(mcls, name, bases, namespace_dict):
4949
module_name = function.__module__
5050
module = sys.modules[module_name]
5151
function_name = function.__name__
52-
anchor_address = '.'.join((module_name, function_name))
5352

5453
# Since this metaclass is a hacky enough solution as it is, let's
5554
# be careful and ensure no object is already defined by the same
56-
# name in the module level:
55+
# name in the module level: (todotest)
5756
try:
58-
already_defined_object = address_tools.resolve(anchor_address)
57+
already_defined_object = getattr(module_name, function_name)
5958
except AttributeError:
6059
# Good, there is no object defined under our anchor address.
6160
# This is the normal case.

0 commit comments

Comments
 (0)