descriptors for container items

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brock Filer

    #1

    descriptors for container items

    [color=blue][color=green]
    > > If I do that, the attributes (that was a stupid name for me to[/color]
    > choose)[color=green]
    > > and children would have to not share any names with each other,[/color]
    >
    > Since multiple objects can indeed have duplicate attribute names, and
    > such
    > duplication is rampant in Python, I am not sure what you mean.[/color]

    felons['@class'] = 'capital'
    felons['class'].do_something()
    felons.class -> SyntaxError

    I thought I had my previous example down to:

    countries/'us'/'Colorado'/'Denver'['@population']

    , but of course that tries to subscript a string with a string; which
    might be an interesting idiom for substring searching, as long as it
    never returned -1.

Working...