Skip to content

Registration should update pdarray.name in place #729

@reuster986

Description

@reuster986

Currently, to safely use a registered array, a user must reassign the array:

a = a.register('myarray')

In my experience, users typically expect registration to be an in-place operation:

a.register('myarray')

but after this operation, a.name is still id_123, not myarray. This tends to cause confusion, e.g. after calling ak.clear().

Having the registration function update a.name in-place would provide more intuitive usage and would also make it easier to register complex objects without having to reassign every attribute.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions