Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add size to Important optional methods #17525

Merged
merged 4 commits into from
Jul 21, 2016
Merged

add size to Important optional methods #17525

merged 4 commits into from
Jul 21, 2016

Conversation

oxinabox
Copy link
Contributor

@oxinabox oxinabox commented Jul 21, 2016

See e01dcf3#commitcomment-18331656

size like length should be present in the list of methods.
[ci skip]

@tkelman
Copy link
Contributor

tkelman commented Jul 21, 2016

[ci skip]

that should be in the commit message, it doesn't count if it's only in the PR description

:func:`start(iter) <start>` Returns the initial iteration state
:func:`next(iter, state) <next>` Returns the current item and the next state
:func:`done(iter, state) <done>` Tests if there are any items remaining
**Important optional methods** **Default definition** **Brief description**
:func:`eltype(IterType) <eltype>` ``Any`` The type the items returned by :func:`next`
:func:`length(iter) <length>` (*undefined*) The number of items, if known
:func:`size(iter, [dim...]) <size>` (*undefined*) The number of items in each dimensions, if known
Copy link
Contributor

Choose a reason for hiding this comment

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

in each dimension

==================================================================== ==================================
`HasEltype()` :func:`eltype(IterType) <eltype>`
`EltypeUnknown()` (*none*)
==================================================================== ==================================
Copy link
Contributor

Choose a reason for hiding this comment

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

you may need an extra blank line after the end of the table to avoid a sphinx error

@tkelman tkelman merged commit bd22093 into JuliaLang:master Jul 21, 2016
mfasi pushed a commit to mfasi/julia that referenced this pull request Sep 5, 2016
* add size to Important optional methods

* More extensive tables explaining what methods are required by traits

* fix typo [ci skip]

* newlines cod reStructuredText likes them [ci skip]
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.

2 participants