Skip to content

Commit

Permalink
Changed comment and removed non-existing nonlocal_hclass import
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin De Schepper committed Mar 20, 2021
1 parent e447ce7 commit 3d996e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions share/lib/python/neuron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,14 @@ def test_rxd(exitOnError=True):

import sys, types

# Load the `hclass` factory for the correct Python version 2/3 and prevent the
# incorrect module source code from being opened by creating an empty module.
if sys.version_info[0] == 2:
from neuron.hclass2 import hclass
# Add hclass3, the py3 variant of hclass2 to the module cache so that hclass3.py
# is never read by the Python 2 interpreter and can contain Python 3 only syntax.
sys.modules["neuron.hclass3"] = types.ModuleType("neuron.hclass3")
from neuron.hclass2 import hclass
else:
from neuron.hclass3 import hclass, nonlocal_hclass
sys.modules["neuron.hclass2"] = types.ModuleType("neuron.hclass2")
from neuron.hclass3 import hclass

# global list of paths already loaded by load_mechanisms
nrn_dll_loaded = []
Expand Down

0 comments on commit 3d996e5

Please sign in to comment.