no subscripting of SectionList in python

When Python is the interpreter, what is a good
design for the interface to the basic NEURON

Moderator: hines

Post Reply
Posts: 66
Joined: Wed May 18, 2005 10:37 pm

no subscripting of SectionList in python

Post by wwlytton »

in some cases, the flexibility of python provides some additional functionality that was not available in hoc

in current case, I was hoping to avoid prior practice of copying SectionLists onto regular Lists to get random access -- I noted that in Python, a __getitem__ was exposed in dir(h.SectionList)

however that did not permit indexing, presumably due to the underlying structure being something that does not permit random access - a linked list?

... TypeError: unsubscriptable object
Post Reply