3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

PUIDGenerator: allow custom counter start values

This commit is contained in:
James Lu 2017-07-05 00:12:25 -07:00
parent 163f0099e7
commit 4e082c2bbf

View File

@ -79,9 +79,9 @@ class PUIDGenerator():
Pseudo UID Generator module, using a prefix and a simple counter.
"""
def __init__(self, prefix):
def __init__(self, prefix, start=0):
self.prefix = prefix
self.counter = 0
self.counter = start
def next_uid(self, prefix=''):
"""