no subscripting of SectionList in python

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

Moderator: hines

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

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?

h.SPI.apical.__getitem__(0)
... TypeError: unsubscriptable object
Post Reply