Subscript AST Node

Andrew Wilkinson ajw126NO at SPAMyork.ac.uk
Wed Nov 20 07:26:31 EST 2002


Hi,

I'm working with the Python syntax tree as returned by compiler.parseFile().
Looking at the documentation the subscript node has three attributes, expr,
flags and subs.

'expr' is obvious and does exactly what I'd expect it to do,
'flags' seems to be undocumented (it probably is the source code, but I'd
prefer not go that deep...) - what does it do?
I expected 'subs' to be a single AST node, but instead it's a list - under
what circumstances would this have more than one element in the list?

Any help in understanding this would be greatly appreciated,
Cheers,
Andrew Wilkinson

---
You tried your best and you've failed miserably. The lesson is, never try.






More information about the Python-list mailing list