l.s.f.s.UserSliceScope(ScopeWithPerson) : class documentation

Part of lp.services.features.scopes View In Hierarchy

Selects a slice of all users based on their id.

Written as 'userslice:a,b' with 0<=a<b will slice the entire user population into b approximately equal sub-populations, and then take the a'th zero-based index.

For example, to test a new feature for 1% of users, and a different version of it for a different 1% you can use userslice:10,100 and userslice:20,100`.

You may wish to avoid using the same a or b for different rules so that some users don't have all the fun by being in eg 0,100.

Method lookup Returns true if the given scope name is "active".

Inherited from ScopeWithPerson:

Method __init__ Undocumented
Method person Undocumented

Inherited from BaseScope (via ScopeWithPerson):

Method compiled_pattern The compiled scope matching regex. A small optimization.
def lookup(self, scope_name):
Returns true if the given scope name is "active".
API Documentation for Launchpad, generated by pydoctor at 2019-08-20 00:00:04.