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

iter.next() or iter.__next__() ? #47521

Closed
vizcayno mannequin opened this issue Jul 3, 2008 · 4 comments
Closed

iter.next() or iter.__next__() ? #47521

vizcayno mannequin opened this issue Jul 3, 2008 · 4 comments
Assignees
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@vizcayno
Copy link
Mannequin

vizcayno mannequin commented Jul 3, 2008

BPO 3271
Nosy @birkenfeld, @benjaminp

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2008-07-03.20:29:29.191>
created_at = <Date 2008-07-03.15:09:59.976>
labels = ['type-bug', 'docs']
title = 'iter.next() or iter.__next__() ?'
updated_at = <Date 2008-07-03.20:29:29.190>
user = 'https://bugs.python.org/vizcayno'

bugs.python.org fields:

activity = <Date 2008-07-03.20:29:29.190>
actor = 'benjamin.peterson'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-07-03.20:29:29.191>
closer = 'benjamin.peterson'
components = ['Documentation']
creation = <Date 2008-07-03.15:09:59.976>
creator = 'vizcayno'
dependencies = []
files = []
hgrepos = []
issue_num = 3271
keywords = []
message_count = 4.0
messages = ['69205', '69226', '69228', '69229']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'vizcayno', 'benjamin.peterson']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue3271'
versions = ['Python 3.0']

@vizcayno
Copy link
Mannequin Author

vizcayno mannequin commented Jul 3, 2008

For Win XP SP3 I do next in py30.b1:

a=[9,8,1,2]
it=iter(a)
it.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'list_iterator' object has no attribute 'next'

but doing:
it.__next__()
9
it.__next__()
8

it is ok.

However, manual of Py3.0 indicates iter.next() as valid.

Python 25 does not accept "it.__next__()" but "it.next()"
Regards.

@vizcayno vizcayno mannequin assigned birkenfeld Jul 3, 2008
@vizcayno vizcayno mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Jul 3, 2008
@benjaminp
Copy link
Contributor

Where in the 3.0 docs do you see it.next() used? It should be changed.

@vizcayno
Copy link
Mannequin Author

vizcayno mannequin commented Jul 3, 2008

Please, go to python 3.0 -> python manuals and search with word: iter
then select first line of found titles, i.e. Functional Programming
HOWTO. Into this title you will find some samples.
Regards,

@benjaminp
Copy link
Contributor

fixed in r64696.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants