Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename Automaton.attributes()

See original GitHub issue

@eliotwrobson So you probably recall that I recently added an Automaton.attributes() method to retrieve all the public (non-underscore-prefixed) attributes on an Automaton instance, inspired by @Tagl’s recent PR. However, I find the current name a little ambiguous, since some members that are technically considered attributes are excluded from the resulting dict.

Here are some alternative ideas I have, mostly based on the observation that every public Automaton attribute also appears to be an input parameter to its respective __init__:

  • parameters
  • input_parameters
  • input_params

I’m also considering if this would be better as a @property rather than a method. I like the brevity of omitting any verbiage, but on the flip side, want to property communicate that this method isn’t an input parameter in itself.


Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

caleb531commented, Nov 3, 2022

@eliotwrobson Closing this now because the related PR has been merged. Thanks for your feedback on this.

caleb531commented, Oct 28, 2022

@eliotwrobson That’s a thought, but I think I’d rather just use input_parameters with an updated comprehension:

    attr_name: getattr(dfa, attr_name)
    for attr_name in dfa.__slots__
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to rename attributes and still support the old name of it?
Basically, I am looking for some kind of hook if the old attribute is supplied, use it for the new name, but do...
Read more >
Attribute renaming using attribute values - FME Community
I have a set of data with 3 columns. Fieldname, Fieldval, RecordGroup. I simply want to aggregate by recordgroup and then rename attribute...
Read more >
Rename (Blending) - RapidMiner Documentation
The Rename operator is used for renaming one or more attributes of the input ExampleSet. Please keep in mind that attribute names must...
Read more >
Attribute Rename geometry node - SideFX
The Attribute Rename op allows you to manually rename and delete point and primitive attributes. The RenderMan page remaps attributes especially for the ......
Read more >
MySQL Rename Column - Javatpoint
In this syntax, we can see that we may require re-specification of all the column attributes. This syntax can also allow us to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found