lib/util/id.py
def generate_id(prefix=None):
    '''
    Generates and returns a `str` id.

    The id is generated by appending the `prefix` to a globally unique integer
    counter. The counter is not specific to the prefix.
    '''
    if not isinstance(prefix, str):
        raise TypeError('prefix must be a str: %r' % (prefix))

    if prefix is None:
        prefix = ''

    current_count = _get_counter()
    _increment_counter()

    return '%s%d' % (prefix, current_count)

    Generates and returns a `str` id.

    The id is generated by appending the `prefix` to a globally unique integer
    counter. The counter is not specific to the prefix.
    
Generates and returns a `str` id.
The id is generated by appending the `prefix` to a globally unique integer
counter. The counter is not specific to the prefix.
Generates and returns a ` str ` id . The id is generated by appending the ` prefix ` to a globally unique integer counter . The counter is not specific to the prefix .
def generate_id(prefix=None):
    if not isinstance(prefix, str):
        raise TypeError('prefix must be a str: %r' % (prefix))
    if prefix is None:
        prefix = ''
    current_count = _get_counter()
    _increment_counter()
    return '%s%d' % (prefix, current_count)
def generate_id ( prefix = None ) : if not isinstance ( prefix , str ) : raise TypeError ( 'prefix must be a str: %r' % ( prefix ) ) if prefix is None : prefix = '' current_count = _get_counter ( ) _increment_counter ( ) return '%s%d' % ( prefix , current_count )
Generates and returns a `str` id.
Generates and returns a ` str ` id .
'''
    Generates and returns a `str` id.

    The id is generated by appending the `prefix` to a globally unique integer
    counter. The counter is not specific to the prefix.
    '''
prefix