cf.RELAXED_IDENTITIES¶
-
cf.RELAXED_IDENTITIES(*arg)[source]¶ Use ‘relaxed’ mode when getting a construct identity.
If set to True, sets
relaxed=Trueas the default in calls to a construct’sidentitymethod (e.g.cf.Field.identity).This is used by construct arithmetic and field construct aggregation.
Parameters: arg:
bool, optionalReturns: boolThe value prior to the change, or the current value if no new value was specified.
Examples:
>>> org = cf.RELAXED_IDENTITIES() >>> org False >>> cf.RELAXED_IDENTITIES(True) False >>> cf.RELAXED_IDENTITIES() True >>> cf.RELAXED_IDENTITIES(org) True >>> cf.RELAXED_IDENTITIES() False