Skip to content

Changed pyclass name of PyArray and PyArrayIter #3612#3685

Merged
youknowone merged 6 commits into
RustPython:mainfrom
rebunto:rename-arrayiterator_arrayarray
May 4, 2022
Merged

Changed pyclass name of PyArray and PyArrayIter #3612#3685
youknowone merged 6 commits into
RustPython:mainfrom
rebunto:rename-arrayiterator_arrayarray

Conversation

@rebunto
Copy link
Copy Markdown
Contributor

@rebunto rebunto commented May 3, 2022

Resolves #3612

The issue is

The name of array.array iterator has to be array_iterator but arrayiterator in RustPython.

but it is "The name of array.array iterator has to be arrayiterator but array_iterator in RustPython", right?

and I also changed also PyArray's name,
because it looks different from CPython's.

Copy link
Copy Markdown
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

Could you please add a related test to extra_tests/snippets/stdlib_array.py to ensure this behavior is now same for CPython and RustPython?

Comment thread stdlib/src/array.rs Outdated

#[pyattr]
#[pyclass(name = "array")]
#[pyclass(name = "array.array")]
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.

we typically put only array here. the other array came from the module name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Understood! I fixed it and added tests.

@youknowone
Copy link
Copy Markdown
Member

please check your git config user.email matches to your account. It is referring different account.

Copy link
Copy Markdown
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

looks good, thank you for contributing!

@youknowone youknowone merged commit 392a947 into RustPython:main May 4, 2022
@rebunto rebunto deleted the rename-arrayiterator_arrayarray branch May 4, 2022 06:46
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.

Array iterator name is different from CPython

3 participants