Class
zope.app.authentication.idpicker.IdPicker

Helper base class that picks principal ids.

Add numbers to ids given by users to make them unique.

The Id picker is a variation on the name chooser that picks numeric ids when no name is given.

>>> from zope.app.authentication.idpicker import IdPicker
>>> IdPicker({}).chooseName('', None)
u'1'
>>> IdPicker({'1': 1}).chooseName('', None)
u'2'
>>> IdPicker({'2': 1}).chooseName('', None)
u'1'
>>> IdPicker({'1': 1}).chooseName('bob', None)
u'bob'
>>> IdPicker({'bob': 1}).chooseName('bob', None)
u'bob1'

Base classes

Implemented Interfaces

Attributes/Properties

There are no attributes in this class.

Methods

Known Subclasses

There are no known subclasses.