On 10/15/10 7:16 AM, Henning Hraban Ramm wrote:
> Since I struggled too long while trying to append items to
> dDropdownList.Choices:
>
> Would you care to add a hint to the docstrings of dControlItemMixin
> that list properties aren't usable like normal Python lists?
Do you mean that you can't do:
lst.Choices = ["a", "b", "c"]
lst.Choices.append("d")
but that you instead have to:
lst = lst.Choices = ["a", "b", "c"]
lst.Choices.append("d")
lst.Choices = lst.Choices
This has struck me as kind of awkward, too. I wonder if we could make it better
all
around by accepting any sequence type to Choices, but converting that sequence
to a
tuple, so that if someone tries to modify it in place, they'd get an exception
and
understand immediately that they have to reassign the whole sequence.
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]