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

Display array base when nonzero #1819

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Conversation

BCSharp
Copy link
Member

@BCSharp BCSharp commented Nov 28, 2024

This is one of several changes I have stashed since several years ago that never got to the top of the priority list because the functionality looked so fringe or insignificant. I am submitting them now, before the code restructuring tsunami hits.

One of the oddities of .NET is support of arbitrary-based arrays. They are clumsy to create and use, esp. in strongly typed languages, but there they are. Support of them in IronPython is somewhat unfinished, probably for good reason, since it is such a fringe concept, and perhaps never used in anything serious.

Since two arrays with identical content but different bases (lower bounds) are not the same, their repr string should be different. This PR adds the display of the base in case it is non-zero.

Copy link
Contributor

@slozier slozier left a comment

Choose a reason for hiding this comment

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

Did not even know that was a thing. 😄

@slozier slozier merged commit aefaecb into IronLanguages:main Nov 28, 2024
8 checks passed
@BCSharp BCSharp deleted the array_repr branch November 28, 2024 15:52
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