I have my locators as an attribute of the class in the following way
class Page(BasePage):
# <-- Page locators -->
DOMAINS_TABLE_ROWS = (By.XPATH, "//tr[contains(@class, row)]")
DOMAIN = (By.XPATH, "//th[@class='field-name']//a")
# <-- Page locators -->
Often I need to modify XPath locators with something like .format() and I was wondering what would be the best way to do so since I'm referencing to this locator as self.DOMAIN, later in the base class I unpack this locator using *locator.