You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey while working on recipe run export I needed to query the "name" of a recipe (ie TeamRecipe, BondRecipe). I was suprised to see there wasn't already a short variable for this and had to do recipe.__class__.__name__ instead.
I was thinking this might be useful for other people to have a shorter variable to get the name of a recipe, so I was thinking of adding a @property to BaseRecipe like the following
The reason I am filling this issues is to get feedback. Do people think "name" is the right term, or is that too generic and likely conflict. shortname possibly?
The text was updated successfully, but these errors were encountered:
I'm not sure about the use case for this, I understand that shortcuts like this can sometimes be useful, but I think this isn't something that's going to be used commonly.
from inside the recipe, you don't really need to refer to the recipes name
from internal LNST code, e.g. logging, it's better to treat Recipe classes as just another class and not depend on the shortcut existing
it does define the attribute as something specific and exported - all recipes will now have it and therefore the test developer can't use something as generic as name for their own purposes, this could be a potential downside
it could be useful for external tool integrations, but again, I'm not sure why not just use the object.class.name as if working with any other generic object instance in python...
Don't know, it feels a bit weird to me to export internal python attributes via shortcuts directly as part of an API.
Hey while working on recipe run export I needed to query the "name" of a recipe (ie TeamRecipe, BondRecipe). I was suprised to see there wasn't already a short variable for this and had to do
recipe.__class__.__name__
instead.I was thinking this might be useful for other people to have a shorter variable to get the name of a recipe, so I was thinking of adding a
@property
toBaseRecipe
like the followingThe reason I am filling this issues is to get feedback. Do people think "name" is the right term, or is that too generic and likely conflict.
shortname
possibly?The text was updated successfully, but these errors were encountered: