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

Update __repr__() method #544

Closed
nautics889 opened this issue Apr 21, 2023 · 2 comments
Closed

Update __repr__() method #544

nautics889 opened this issue Apr 21, 2023 · 2 comments
Labels
type: feature Introduction of new functionality to the application

Comments

@nautics889
Copy link
Contributor

nautics889 commented Apr 21, 2023

It'd be good to see more verbose info in representation of Record object. Currently __repr__() return the same as __str__() (either "name" or "label" or "display").

It should rather look like:

<pynetbox.core.response.Record ('some_record') at mem_location>

Similar to nautobot/pynautobot#67 from pynautobot tool

@abhi1693 abhi1693 added status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Introduction of new functionality to the application labels Aug 28, 2023
@abhi1693
Copy link
Member

abhi1693 commented Sep 3, 2023

I don't think it is good to change for Record.

>>> nb.circuits.circuits.get(id=19)
1002840283
>>> nb.circuits.circuits.filter(id=19)
<pynetbox.core.response.RecordSet object at 0x7fa981389f00>

As a user, I prefer to keep the representation for Record as is but may change it to RecordSet. However, while giving a more thought, I don't see much value in this.

@nautics889
Copy link
Contributor Author

@abhi1693 sounds reasonable.

@nautics889 nautics889 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2023
@abhi1693 abhi1693 removed the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants