Skip to content

Trait container documentation#1058

Merged
corranwebster merged 2 commits into
masterfrom
doc/trait-container-documentation
May 5, 2020
Merged

Trait container documentation#1058
corranwebster merged 2 commits into
masterfrom
doc/trait-container-documentation

Conversation

@corranwebster
Copy link
Copy Markdown
Contributor

Added documentation about the new Trait container classes to the internals section, plus some minor clarifications to the section on TraitEvents

Fixes #997.

Checklist

  • [ ] Tests
  • [ ] Update API reference (docs/source/traits_api_reference)
  • Update User manual (docs/source/traits_user_manual)
  • [ ] Update type annotation hints in traits-stubs

``validate(validate(x)) == validate(x)`` should hold as long as
``validate(x)`` does not raise an error.

For example, the following validator casts the list items to integers,
Copy link
Copy Markdown
Member

@mdickinson mdickinson May 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, but can we spell this as "converts" instead of "casts" (and similarly elsewhere)? C has casts. Python doesn't. (Yes, I know this is a losing battle.)

listener systems. They have a fixed signature, which is slightly different for
lists, dicts and sets, but in all cases starts with the container object itself.
Notifiers are called in the order that they appear in the notifiers list and
should not mutate the parameters that they have been passed.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point; hadn't thought of that.

Copy link
Copy Markdown
Member

@mdickinson mdickinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@corranwebster corranwebster merged commit 528516c into master May 5, 2020
@corranwebster corranwebster deleted the doc/trait-container-documentation branch May 5, 2020 07:26
mdickinson added a commit that referenced this pull request May 22, 2020
* Add changelog for 6.1, release summary is still missing

* Comestic fixes

* Move Misc item to the bottom

* Add placeholder for release date; add recent PRs

* Stash partial work before context switch

* More updates; move #1058 to correct section; add #1127

* More updates; mostly formatting

* Update CHANGES.rst

Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com>

* More tweaks to wording and content

* More wording tweaks

* Use short form for View reference

* Make use of the intersphinx mapping

* Rewordings

* Remove broken links

* Add recent PRs; fix some long lines

* Combine duplicate change entries for Traits / TraitsUI compatibility

* Add note about default versus default_value for Either and Union

* Add back note that Either will eventually be deprecated.

* Remove some duplicate entries; add some missing ones

* Ordering

* More PRs (sneakily adding #1142 before it's actually merged)

Co-authored-by: Kit Yan Choi <kchoi@enthought.com>
Co-authored-by: Kit Choi <kitchoi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document meaning and use of TraitList notification arguments

2 participants